Question: 7 Find the output of the following program:
# statement 1 list1 = range(100, 110) # statement 2 print (list1.index(105)) |
chevron_right
filter_none
(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
Recommended Posts:
- Python-Quizzes | Python List Quiz | Question 13
- Python-Quizzes | Python List Quiz | Question 2
- Python-Quizzes | Python List Quiz | Question 22
- Python-Quizzes | Python List Quiz | Question 3
- Python-Quizzes | Python List Quiz | Question 4
- Python-Quizzes | Python List Quiz | Question 5
- Python-Quizzes | Python List Quiz | Question 6
- Python-Quizzes | Python List Quiz | Question 8
- Python-Quizzes | Python List Quiz | Question 9
- Python-Quizzes | Python List Quiz | Question 10
- Python-Quizzes | Python List Quiz | Question 11
- Python-Quizzes | Python List Quiz | Question 12
- Python-Quizzes | Python List Quiz | Question 14
- Python-Quizzes | Python List Quiz | Question 15
- Python-Quizzes | Python List Quiz | Question 16
- Python-Quizzes | Python List Quiz | Question 17
- Python-Quizzes | Python List Quiz | Question 18
- Python-Quizzes | Python List Quiz | Question 19
- Python-Quizzes | Python List Quiz | Question 20
- Python-Quizzes | Python List Quiz | Question 21

