Skip to content

Instantly share code, notes, and snippets.

@toyeiei
Created November 11, 2018 00:15
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 toyeiei/b0b8db85b776d31afce230bd2cc6b282 to your computer and use it in GitHub Desktop.
Save toyeiei/b0b8db85b776d31afce230bd2cc6b282 to your computer and use it in GitHub Desktop.
test count_item() function with new lists
# input
animals = ['dog', 'cat', 'cat', 'dog', 'dog', 'dog', 'cat', 'dog', 'hippo']
genders = ['M', 'F', 'F', 'F', 'M']
balls = ['red', 'red', 'blue', 'blue', 'blue', 'black']
# test function
print(count_item(animals))
print(count_item(genders))
print(count_item(balls))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment