If the list contains exactly three elements to n, it will return a Boolean True. If not, it will return a Boolean false. It's like a three of a kind game. The list also has to have a range of 1-6 and length of 1-6 characters. I have this part figured out, but I don't know how to count the number of times an integer appears in the list. I have this but it's not right at all, anything would help!
def threeOfAKind(aList,n):
if 1<=len(aList)<=6 and set(aList)<=set(range(1,6)):
for n=>3 in aList:
return True
I do not want it to return the count of the list. I want it to return Boolean True or False.