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

What is the error in the following code snippet if the intention is to find the largest value?

largest_so_far = -1
for the_num in [9, 41, 12, 3, 74, 15]:
    if the_num < largest_so_far:  # Error here
        largest_so_far = the_num