mzaini30

Tampil List per 5

Dec 10th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. #-*-coding:utf8;-*-
  2. #qpy:2
  3. #qpy:console
  4.  
  5. print "This is console module"
  6. print
  7.  
  8. data = """17
  9. 21
  10. 18
  11. 22
  12. 22
  13. 19
  14. 20
  15. 23
  16. 22
  17. 23
  18. 23
  19. 23
  20. 23
  21. 17
  22. 15
  23. 21
  24. 17
  25. 22
  26. 16
  27. 19
  28. 16
  29. 16
  30. 16
  31. 21
  32. 19
  33. 22
  34. 20
  35. 22
  36. 24
  37. 21
  38. 18
  39. 15
  40. 15
  41. 15
  42. 14
  43. 16
  44. 15
  45. 16
  46. 15
  47. 17"""
  48.  
  49. data2 = data.splitlines()
  50. for n, x in enumerate(data2):
  51.     if (n + 1) % 5 != 0:
  52.         print x
  53.     else:
  54.         print x
  55.         print
Advertisement
Add Comment
Please, Sign In to add comment