This is the End
We'll cover the following...
1.
List slicing with out of bounds indices throws no errors.
Press + to interact
some_list = [1, 2, 3, 4, 5]print(some_list[111:])
2.
Slicing an iterable does not always create a new object. For example:
Press + to interact
some_str = "ftwpython"some_list = ['f', 't', 'w', 'p', 'y', 't', 'h', 'o', 'n']print(some_list is some_list[:]) # False expected because a new object is created.print(some_str is some_str[:]) # True because strings are immutable, so making a new object is of not much use.
3.
...