T thanhthao New member Sep 20, 2021 #1 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
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
S Sheeshy Sipgrark New member Sep 20, 2021 #2 Answer: c Explanation: The above piece of code basically prints the index of the largest element in the list. Upvote 0 Downvote
Answer: c Explanation: The above piece of code basically prints the index of the largest element in the list.