Puzzle 10: Explanation
Let’s learn about the concept of slicing in Python.
We'll cover the following...
Let’s try it!
Try executing the code below to verify the result:
Press + to interact
a = [1, 2, 3, 4]a[1:2] = [10, 20, 30]print(a)
Explanation
Python’s slicing ...