I'm new to programming in python so please bear over with my newbie question...
I have one initial list (list1) , which I have cleaned for duplicates and ended up with a list with only one of each value (list2):
list1 = [13, 19, 13, 2, 16, 6, 5, 19, 20, 21, 20, 13, 19, 13, 16],
list2 = [13, 19, 2, 16, 6, 5, 20, 21]
What I want is to count how many times each of the values in "list2" appears in "list1", but I can't figure out how to do that without getting it wrong.
The output I am looking for is something similar to this:
Number 13 is represented 1 times in list1. ........ Number 16 is represented 2 times in list1.