Seminar 1
Quiz: Data Types in Python
Let’s test your understanding of Python data types!
What is the output of the following code?
a = [1, 2, 3] b = (1, 2, 3) print(type(a), type(b))Which of the following is mutable?
What will be the output of this code?
my_dict = {'a': 1, 'b': 2, 'c': 3} print(my_dict['b'])How do you create an empty set in Python?
What is the result of
3 + 4.0?
Click to reveal answers
<class 'list'> <class 'tuple'>- List
- 2
set()- 7.0