🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

निम्नलिखित कथनों का आउटपुट क्या होगा?

What will be the output of the following statements ?

list1 =[1,2,3,4,5]
print(list1[len(list1)-1])
A
5
B
15
C
4
D
Error
Explanation

The list list1 has 5 elements. len(list1) - 1 gives the index of the last element (4), which is 5.

Answer: (A) 5

Correct Answer: A) 5

Latest Updates