fork download
  1. # your code goes here
  2. mas = [1,2,3,4,5,6,7,8,9,10]
  3. mas= [j for i in zip(mas[1::2], mas[::2]) for j in i]
  4. print(mas)
Success #stdin #stdout 0.04s 9340KB
stdin
Standard input is empty
stdout
[2, 1, 4, 3, 6, 5, 8, 7, 10, 9]