Report Bug

Qus

What will be the output of the following code?

list1=[2,33,222,14,25]
print(list1[-1])
Qus

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

list1=[2,33,222,14,25]
print(list1[-1])


A. 2
B. 33
C. 14
D. 25


Solution
D. 25



Explanation

in python list index start with 0 1 2 and the reverse index start from -1, -2 so on (from the end of list) so list1[-1] return the first element from right of list (last element from left)

Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad