ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
Python MCQ Practice Questions SET 17
2
3
Sr. No.QuestionOption 1Option 2Option 3Option 4Correct Option
4
161Which function is used to convert a string to a list in Python?list()to_list()split()convert()c
5
162What does the range() function in Python do?Generates a sequence of numbersCalculates the range of values in a listReturns a random numberReturns the factorial of a numbera
6
163Which function is used to merge two dictionaries in Python?merge()concatenate()combine()update()d
7
164What does the type() function in Python return?Returns the type of an objectReturns the memory address of an objectReturns the size of an objectReturns the length of an objecta
8
165Which function is used to count the occurrences of a specific element in a list in Python?count()find()search()occurrences()a
9
166What does the chr() function in Python do?Returns the character representation of an ASCII valueReturns the ASCII value of a characterReturns the Unicode representation of a characterReturns the hexadecimal representation of a charactera
10
167Which function is used to convert a list of tuples into a dictionary in Python?to_dict()dict_from_list()convert()dict()d
11
12
13
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