Aug-01-2021, 03:06 AM
Just thought of this while I was ironing the clothes.
There is almost always more than 1 way to solve a programming problem.
There is almost always more than 1 way to solve a programming problem.
my_list = [1, 2, 3] order = [1, 2, 0] list2 = [my_list[x] for x in order]# returns [2, 3, 1]