Podcast
Questions and Answers
Which function is used to create a list object in Python?
Which function is used to create a list object in Python?
- tuple()
- set()
- dict()
- list() (correct)
What is a key characteristic of a list object in Python?
What is a key characteristic of a list object in Python?
- Immutable
- Unordered
- Changeable (correct)
- Unindexed
What is the difference between a tuple and a list in Python?
What is the difference between a tuple and a list in Python?
- Tuples are ordered and changeable, while lists are not.
- Tuples are immutable, while lists are not. (correct)
- There is no difference between a tuple and a list in Python.
- Tuples can only contain integers, while lists can contain any data type.