Advertisement
Chunderstruck

advent

Dec 1st, 2021
940
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. increase = 0
  2. l = a.strip().split()
  3.  
  4. int_list = [int(i) for i in l]
  5.  
  6. increase = 0
  7.  
  8. previous = None
  9. for i in int_list:
  10.     print("previous: {} - Compare: {}".format(previous, i))
  11.  
  12.     if not previous:
  13.  
  14.         print("first")
  15.     elif i > previous:
  16.         increase = increase + 1
  17.         print("Increase: {}".format(increase))        
  18.     previous = i
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement