Jak zmienić listę w Python
a_list = ["a", "b", "c"]
order = [1, 0, 2]
a_list = [a_list[i] for i in order]
print(a_list) #['b', 'a', 'c']
Azad Kshitij
a_list = ["a", "b", "c"]
order = [1, 0, 2]
a_list = [a_list[i] for i in order]
print(a_list) #['b', 'a', 'c']