A program changes a list with several methods, takes a copy first, and ends with a slice that starts before the list does. v = [5, 3, 8, 1] w = v[:] v.reverse() w.sort(reverse=True) x = v.pop(1) print(v, w, x, v[-5:]) What does the program print?
Log in to join the discussion.
Loading…