الرجوع
تسجيل الدخول
هذه نسخة مؤرشفة قديمة من الموقع انتقل إلى كاتوديمي ←

Which error is likely if you mistakenly set index = len(fruit) at the beginning of the loop?

fruit = 'banana'
index = len(fruit)
while index < len(fruit):
    letter = fruit[index]
    print(index, letter)
    index = index + 1