Skip to content

Instantly share code, notes, and snippets.

@toyeiei
Created Nov 11, 2018
Embed
What would you like to do?
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