The first three letters · 最初の3文字
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 · 文字列の操作 →
The first three letters
word is "python". Store its first three characters in part using a slice.
⚠️ A slice stops before its second number. word[:3] gives three characters — positions 0, 1, 2 — and never position 3. So the number you write is the COUNT you want, not the last position.
word is "python". Store its first three characters in part using a slice. · word は "python" です。スライスを使って最初の 3 文字を part に保存してください。
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。