Question:

Which of the following is the output of the below Python code?

test_list = [1, 5, 5, 5, 5, 1]
max = test_list[0]
indexOfMax = 0
for i in range(1, len(test_list)):
    if test_list[i] > max:
        max = test_list[i]
        indexOfMax = i
print(indexOfMax)

Answers:


Keywords:

© 2017 QuizBucket.org