Skip to content

Instantly share code, notes, and snippets.

@pydanny
Created April 3, 2024 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pydanny/716d9c399fd1f75fba40053017af43c2 to your computer and use it in GitHub Desktop.
Save pydanny/716d9c399fd1f75fba40053017af43c2 to your computer and use it in GitHub Desktop.
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