Exercise 5 · Chapter: ListsRequired+50 XP
List Slice
You have this list already defined:
numbers = [10, 20, 30, 40, 50, 60]
Use slicing to:
- Print the first 3 items of the list.
- Print the last 2 items of the list.
Expected output:
[10, 20, 30] [50, 60]
Need a hint?
3 available · costs 5 XP each
python
Output
Run your code to see the output here.