fork download
  1. yoba = [ 0, 1, 4, 6, 3, 4, 0, 0, 4, 2, 4 ]
  2. for i, x in enumerate(filter(None, yoba)):
  3. print('{} --{}--'.format(x, 1 if i%2==0 else 2))
Success #stdin #stdout 0.01s 27704KB
stdin
Standard input is empty
stdout
1 --1--
4 --2--
6 --1--
3 --2--
4 --1--
4 --2--
2 --1--
4 --2--