>>> outerlist = [[1, 2], [3, 4], [5, 6]] >>> [sublist[::-1] for sublist in outerlist] [[2, 1], [4, 3], [6, 5]]
No comments:
Post a Comment