1.
In Python, dictionaries are implemented as ____________________________.
2.
What is the output of the following Python code:
l = []
l.append('foo')
l.append('bar')
l.append('baz')

s = ''.join(l)
print(s)
3.
How can you handle exceptions in Python?
4.
What is the output of the following Python code:
d1 = {
    1: 1,
    2: 2
}
d2 = {
    2: 'ha!',
    3: 3
}
d1.update(d2)
print(d1)
5.
What is the output of the following Python code:
a = [1, 2, 3, 4, 5, 6, 7, 8, 9]
print(a[::2])
6.
What is the output of the following Python code:
a = [10, 20, 30, 40]
print(a[3: 0: -1])
7.
What is the output of the following Python code:
def f(value, values):
    v = 1
values[1] = -1

t = 3
v = [1, 2, 3]
f(t, v)
print(t, v[1])
8.
In Python, a list is ____________________________.
9.
What is the output of the following Python code:
l1 = [1, 2, 3]
l1.pop()
l1.push(1)
10.
In Python, which of the following statements is true:

  1. Tuples have structure, lists have an order.

  2. Tuples are homogeneous, lists are heterogeneous.

  3. Tuples are immutable, lists are mutable.


  4.