Test Index

CBSE Class 12 Computer Science 2023 Paper Set 4 Get it on Google PlayDownload on the App Store

© examsnet.com
Question : 21 of 35
Marks: +1, -0
(a) Given is a Python list declaration :
Listofnames=["Aman","Ankit","Ashish","Rajan","Rajat"]
Write the output of :
print (Listofnames [-1:-4:-1])
[1]
(b) Consider the following tuple declaration :
tup1=(10,20,30,(10,20,30),40)
Write the output of :
print(tup1.index(20))
[1]
Advertisements
Go to Question: