Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c = [0, 10, 11, 48, 50.5, 0.48, 17, 18, 23, 29, 33, 34.67, 50.1, 0.09, 7, 41, 45, 50]
- C 1:
- Start: (0, 0) # starts at index 0, value 0
- End: (4, 50.5) #ends at index 4, value 50.5
- C 2:
- Start: (5, 0.48)
- End: (12, 50.1)
- C 3:
- Start: (13, 0.09)
- End: (17, 50)
- min = []
- max = []
- for i, (first,second) in enumerate(zip(c, c[1:])):
- if first < second:
- min.append((i,first))
- continue
- if first > second:
- max.append((i,first))
- continue
Add Comment
Please, Sign In to add comment