Python-Quizzes | Python List Quiz | Question 7
Question: 7 Find the output of the following program:
# statement 1 list1 = range ( 100 , 110 ) # statement 2 print (list1.index( 105 )) |
(A) 105
(B) 5
(C) 106
(D) 104
Answer: (B)
Explanation: Statement 1: will genetrate numbers from 100 to 110 and appent all these numbers in the list.
Statement 2: will give the index value of 105 in the list list1.
Quiz of this Question