Python - MCQ

Multiple Choice Questions


Share with a Friend

 

Python - Multiple Choice Questions (MCQ) - Data Structures in Python - Set 16

11. We can delete element from the list by using, Select correct answers 
A). 'del'
B). remove()
C). pop()
D). clear()
E). All the above
View Answer
Correct: E



12. What will be the output 

A). 6
B). error
C). 7
D). [6, 7, 8]
View Answer
Correct: C


13. The python tuple is _____ in nature. 
A). Unchangeable
B). Immutable
C). Both A & B
D). Mutable
View Answer
Correct: C



14. What is the output of 

t1 = ('i', 't', 'd', 'e', 'v', 'e', 'l', 'o', 'p', 'e', 'r')
print(t1[3:9])
A). ('e', 'v', 'e', 'l', 'o', 'p')
B). ('d', 'e', 'v', 'e', 'l', 'o', 'p')
C). Slicing tuple is not possible
D). error
View Answer
Correct: A



15. Select the build-in functions of tuple 
A). count()
B). index()
C). pop()
D). __add__()
E). clear()
View Answer
Correct: A, B, D



 
 
 
   
   
   
UltraInfo Technologies
ITDeveloper