What will be the output of the following Python code? [code] a = [1, 5, 7, 9, 9, 1] <br class="blank" />b=a[0] <br class="blank" />x= 0 for

thanhthao

New member
What will be the output of the following Python code?
Code:
a = [1, 5, 7, 9, 9, 1]
<br class="blank" />b=a[0]
<br class="blank" />x= 0
for x in range(1, len(a)):
    if a[x] > b:
        b = a[x]
        b= x
print(b)
A. 5
B. 3
C. 4
D. 0
 

Tìm kiếm

Back
Top