Guest User

Untitled

a guest
Oct 18th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. for x in AC_temp:
  2. if "," in x: #multiple values
  3. val= x.split(",")
  4. print(val)
  5.  
  6. ['187', '22']
  7. ['754', '17']
  8. ['417', '7']
  9. ['819', '13']
  10. ['606', '1']
  11. ['123', '513']
  12.  
  13. for x in AC_temp:
  14. if "," in x:
  15. val= x.split(",")
  16. for t in val:
  17. AC.append(map(int, t))
  18. else:
  19. AC.append(map(int, x)
  20.  
  21. #print output#
  22. for i in AC:
  23. print(i)
  24.  
  25. [1, 8, 7]
  26. [2, 2]
  27. [7, 5, 4]
  28. [1, 7]
  29. [4, 1, 7]
  30. [7]
  31. [8, 1, 9]
  32. [1, 3]
  33. [6, 0, 6]
  34. [1]
  35. [1, 2, 3]
  36. [5, 1, 3]
Add Comment
Please, Sign In to add comment