Skip to content · ⁨Lompat ke konten⁩

The first three letters · ⁨Tiga huruf pertama⁩

English

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.

Bahasa Indonesia

Tiga huruf pertama

word is "python". Simpan tiga karakter pertama-nya dalam part menggunakan slice.

⚠️ Slice berhenti sebelum nomor keduanya. word[:3] memberikan tiga karakter — posisi 0, 1, 2 — dan tidak pernah posisi 3. Jadi angka yang Anda tulis adalah JUMLAH yang Anda inginkan, bukan posisi terakhir.

Log in or create account · ⁨Masuk atau buat akun⁩

IGCSE, A-Level & AP