Created
April 3, 2024 11:35
-
-
Save pydanny/716d9c399fd1f75fba40053017af43c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lst = [190,200,210,70,60,150,170,90] | |
previous = 0 | |
streak_length = 0 | |
for current in lst: | |
if previous < current: | |
streak_length += 1 | |
else: | |
print(streak_length) | |
previous = 0 | |
continue | |
previous = current | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment