Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created October 8, 2018 13:24
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 codecademydev/75174e97ea0f69fbe251fa00ee138794 to your computer and use it in GitHub Desktop.
Save codecademydev/75174e97ea0f69fbe251fa00ee138794 to your computer and use it in GitHub Desktop.
Codecademy export
def count(sequence, item):
numbercount = 0
for item in sequence:
numbercount += 1
print numbercount
return numbercount
count([1, 2, 1, 1], 1)
count(["Hi", "I am", "Hi", "Hi", "I am"], "Hi")
count(["Hi", "I am", "Hi", "Hi", "I am"], "I am")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment