Podcast
Questions and Answers
What is the correct way to create an empty list in Python?
What is the correct way to create an empty list in Python?
- empty_list()
- new_list()
- empty_list[]
- list{}
- list() (correct)
How can you add an element to the end of a list in Python?
How can you add an element to the end of a list in Python?
- list.append(element) (correct)
- list.push(element)
- list.extend(element)
- list.insert(-1, element)
- list.add(element)
What would be the result of the expression: len([1, 2, 3])?
What would be the result of the expression: len([1, 2, 3])?
- 5
- 2
- 3 (correct)
- 4
- 6
Flashcards are hidden until you start studying