fork download
  1. lst = [1,2,3,4,5]
  2.  
  3. for i in lst:
  4. if i == 1:
  5. print('one')
  6. elif i == 2:
  7. print('two')
  8. else:
  9. print('other')
  10.  
  11.  
  12. for i in lst:
  13. if i == 1:
  14. print('one')
  15. if i == 2:
  16. print('two')
  17. if i not in [1,2]:
  18. print('other')
Success #stdin #stdout 0.04s 63380KB
stdin
Standard input is empty
stdout
one
two
other
other
other
one
two
other
other
other