Skip to content · ⁨דלג לתוכן⁩

The first three letters · ⁨שלוש האותות הראשונות⁩

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.

עברית

שלושת האותות הראשונות

המילה היא "python". אחסן את שלושת האותות הראשונות שלה ב-part באמצעות פרוק (slice).

⚠️ פרוק עצור לפני המספר השני שלו. word[:3] נותן שלושה איברים — המיקומים 0, 1, 2 — ולעולם לא את המיקום 3. לכן המספר שכותבים הוא ה-כמות הרצויה, לא המיקום האחרון.

Log in or create account · ⁨היכנס או צור חשבון⁩

IGCSE, A-Level & AP