fork(3) download
  1. yoba = [ 0, 1, 4, 6, 3, 4, 0, 0, 4, 2, 4 ]
  2. for x in yoba:
  3. if x > 0:
  4. if 1 <= x:
  5. if x % 2 == 0:
  6. print(x, '--1--')
  7. else:
  8. print(x, '--2--')
Success #stdin #stdout 0.02s 28376KB
stdin
Standard input is empty
stdout
1 --2--
4 --1--
6 --1--
3 --2--
4 --1--
4 --1--
2 --1--
4 --1--