Questenaتدريب يوضح لك ما ينبغي مراجعته لاحقًا
السؤال 97

Which index selects the first character of the nonempty string "python"?

  1. 1
  2. 0الإجابة الصحيحة
  3. -1
  4. None

الشرح

Python sequence positions begin at zero, so the first character occupies index 0. Using 1 would select the second character, while a negative value would count from the end.

تابع هذا الاختبار

بدء التدريب
السؤال 97: Which index selects the first character of the nonempty… · Python Fundamentals · Questena