Skip to content

Instantly share code, notes, and snippets.

@solen003
Created August 6, 2018 20:05
Show Gist options
  • Save solen003/d5a228c7999a3054e66a3df55e21a548 to your computer and use it in GitHub Desktop.
Save solen003/d5a228c7999a3054e66a3df55e21a548 to your computer and use it in GitHub Desktop.
summer_69
def summer_69(mylist):
total = 0
add_on = True
for i in mylist:
if i == 9 and add_on == False:
add_on = True
elif i == 6:
add_on = False
elif add_on == True and i != 6:
total += i
print(total)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment