Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Python-Quizzes | Python List Quiz | Question 7

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Find the output of the following program: 

Python3




# 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
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Last Updated : 17 Sep, 2020
Like Article
Save Article
Similar Reads