ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
Python MCQ Practice Questions SET 15
2
3
Sr. No.QuestionOption 1Option 2Option 3Option 4Correct Option
4
141Which of the following built-in functions in Python is used to find the length of an iterable?length()count()size()len()d
5
142What does the format() function in Python do?Formats a string based on a format specifierFormats a string based on a regular expressionFormats a string based on a file descriptorFormats a string based on a delimitera
6
143What is the return type of the map() function in Python?ListDictionaryTupleIteratord
7
144Which of the following built-in functions in Python is used to reverse the order of elements in an iterable?reverse()reversed()invert()backward()b
8
145What is the purpose of the zip() function in Python?To create a list of tuples from two or more iterablesTo compress files in a zip archiveTo extract files from a zip archiveTo zip files for transmissiona
9
146Which built-in function in Python returns a new sorted list from the elements of any iterable?sorted()sort()order()arrange()a
10
147What does the round() function in Python do?Rounds a floating-point number to the nearest integerRounds a floating-point number to a specified number of decimal placesRounds a floating-point number up to the next integerRounds a floating-point number down to the previous integera
11
148Which function in Python is used to display a message to the standard output?print()display()show()output()a
12
149What does the len() function in Python return?Length of a listLength of a stringLength of a tupleAll of aboved
13
150Which function in Python is used to convert a string to uppercase?upper()uppercase()to_upper()capitalize()a
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100