A = ['a', 'c', 'b', 'x', 'f', 'z']
A = ['x', 'a', 'c', 'b', 'f', 'z']
if 'f' in A: print('f' + A)
A = ['x', 'a', 'c', 'b', 'f', 'z'] B = ['f'] + [x for x in A if x != 'f'] print(B)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)