Four slices are cut from one list of six numbers, with different starts, stops and steps. t = [10, 20, 30, 40, 50, 60] print(t[1:5:2], t[::-2], t[-3:], t[4:1]) What does the program print?
[20, 40, 60] [60, 40, 20] [40, 50, 60] []
[20, 40] [60, 40, 20] [40, 50, 60] [50, 40, 30]
[20, 40] [50, 30, 10] [40, 50, 60] []
[20, 40] [60, 40, 20] [40, 50, 60] []
Log in to join the discussion.
Loading…