The last letter · 最後の文字
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · このページには最新のブラウザ(SharedArrayBuffer対応)が必要です。Chrome、Edge、Firefox、Safariを最新バージョンに更新してください。
This one builds on a lesson you haven't finished yet. Do that lesson first: · これはまだ完了していないレッスンの先にある内容です。まずはそのレッスンを済ませてください:
Python Basics · Working with strings · 文字列の操作 →
English
The last letter
word is "python". Store its last character in last, without counting the letters yourself.
A negative position counts from the end: word[-1] is the last character, word[-2] the one before it. It works whatever the length.
日本語
最後尾の文字
word は "python" です。文字を自分で数えずとも、最後 の文字を last に保存してください。
負の位置は末尾から数えます:word[-1] は最後の文字、word[-2] はその前の文字です。長さがどうであっても機能します。
word is "python". Store its last character in last, without counting the letters yourself. · word は "python" です。文字を自分で数えずとも、最後 の文字を last に保存してください。
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。