Open enryH opened 3 years ago
Maybe extend the modifying tricks section
numbers = [1, 2, 3, 4, 5]
numbers[1] = ['a','b','c']
print(numbers)
numbers = [1, 2, 3, 4, 5]
numbers[1:2] = ['a','b','c']
print(numbers)
numbers = [1, 2, 3, 4, 5]
numbers[1:3] = ['a','b','c']
print(numbers)
numbers = [1, 2, 3, 4, 5]
numbers[1:4] = ['a','b','c']
print(numbers)
lists.ipynb
In the current order, list comprehensions are introduced before loops.
Collection of questions on list
Code-Snippets