1.
Which of the following commands will create a list?
A. 
B. 
C. 
D. 
2.
What is the output when we execute list(“hello”)?
A. 
[‘h’, ‘e’, ‘l’, ‘l’, ‘o’]
B. 
C. 
D. 
3.
Suppose listExample is [‘h’,’e’,’l’,’l’,’o’], what is len(listExample)?
A. 
B. 
C. 
D. 
4.
Suppose list1 is [2445,133,12454,123], what is max(list1)?
A. 
B. 
C. 
D. 
5.
Suppose list1 is [1, 5, 9], what is sum(list1)?
A. 
B. 
C. 
D. 
6.
Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?
A. 
B. 
C. 
D. 
7.
Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]?
A. 
B. 
C. 
D. 
8.
Suppose list1 is [1, 3, 2], What is list1 * 2?
A. 
B. 
C. 
D. 
9.
To add a new element to a list we use which command?
A. 
B. 
C. 
D. 
10.
Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse()?
A. 
[3, 4, 5, 20, 5, 25, 1, 3]
B. 
[1, 3, 3, 4, 5, 5, 20, 25]
C. 
[25, 20, 5, 5, 4, 3, 3, 1]
D. 
[3, 1, 25, 5, 20, 5, 4, 3]
11.
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.extend([34, 5])?
A. 
[3, 4, 5, 20, 5, 25, 1, 3, 34, 5]
B. 
[1, 3, 3, 4, 5, 5, 20, 25, 34, 5]
C. 
[25, 20, 5, 5, 4, 3, 3, 1, 34, 5]
D. 
[1, 3, 4, 5, 20, 5, 25, 3, 34, 5]
12.
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop(1)?
A. 
[3, 4, 5, 20, 5, 25, 1, 3]
B. 
[1, 3, 3, 4, 5, 5, 20, 25]
C. 
D. 
13.
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop()?
A. 
B. 
[1, 3, 3, 4, 5, 5, 20, 25]
C. 
D. 
14.
What will be the output of the following Python code?
>>>"Welcome to Python".split()
A. 
[“Welcome”, “to”, “Python”]
B. 
(“Welcome”, “to”, “Python”)
C. 
{“Welcome”, “to”, “Python”}
D. 
“Welcome”, “to”, “Python”
15.
What will be the output of the following Python code?
>>>list("a#b#c#d".split('#'))
A. 
B. 
C. 
D. 
16.
To which of the following the “in” operator can be used to check if an item is in it?
A. 
B. 
C. 
D. 
17.
What will be the output of the following Python code?
list1 = [1, 2, 3, 4]
list2 = [5, 6, 7, 8]
print(len(list1 + list2))
A. 
B. 
C. 
D. 
18.
Which of the following statements create a dictionary?
A. 
B. 
D = {“john”:40, “peter”:45}
C. 
D = {40:”john”, 45:”peter”}
D. 
19.
What will be the output of the following Python code snippet?
d = {"john":40, "peter":45}
A. 
“john”, 40, 45, and “peter”
B. 
C. 
D. 
D = (40:”john”, 45:”peter”)
20.
What will be the output of the following Python code snippet?
d = {"john":40, "peter":45}
"john" in d
A. 
B. 
C. 
D. 
21.
Which of these about a dictionary is false?
A. 
The values of a dictionary can be accessed using keys
B. 
The keys of a dictionary can be accessed using values
C. 
Dictionaries aren’t ordered
D. 
22.
Which of the following is not a declaration of the dictionary?
A. 
B. 
C. 
D. 
23.
What will be the output of the following Python code snippet?
a={1:"A",2:"B",3:"C"}
for i,j in a.items():
print(i,j,end=" ")
A. 
B. 
C. 
D. 
24.
What will be the output of the following Python code snippet?
a={1:"A",2:"B",3:"C"}
print(a.get(1,4))
A. 
B. 
C. 
D. 
Invalid syntax for get method
25.
What will be the output of the following Python code snippet?
a={1:"A",2:"B",3:"C"}
print(a.get(5,4))
A. 
B. 
C. 
D.