Tuples and Dictionaries - tuple assignment, dictionaries operations and methods, iterators and generators, advanced list processing - Online Test
30:00
1. What is the primary characteristic of a tuple in Python?
2. Which of the following is the correct way to create an empty tuple?
3. What does 'tuple assignment' refer to in Python?
4. Consider the code: `a, b, c = (1, 2, 3)`. What are the values of `a`, `b`, and `c` after execution?
5. Can you change the value of an element in a tuple after it has been created?
6. What is the result of `(1, 2) + (3, 4)` in Python?
7. What is the primary characteristic of a dictionary in Python?
8. How are elements accessed in a Python dictionary?
9. Which of the following is the correct way to create an empty dictionary?
10. What will `my_dict = {'a': 1, 'b': 2}; print(my_dict['a'])` output?
Test Results
0/0