The first three letters · Ba chữ cái đầu tiên
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.
Ba ký tự đầu tiên
word là "python". Lưu ba ký tự đầu tiên của nó vào part sử dụng một đoạn cắt (slice).
⚠️ Một đoạn cắt dừng trước số thứ hai. word[:3] cho ba ký tự — các vị trí 0, 1, 2 — và không bao giờ vị trí 3. Vậy số bạn viết chính là SỐ LƯỢNG bạn muốn, không phải vị trí cuối cùng.
word is "python". Store its first three characters in part using a slice. · word là "python". Lưu ba ký tự đầu tiên của nó vào part sử dụng một đoạn cắt (slice).
Click Run to see the output here. · Nhấn Chạy để xem kết quả ở đây.