I want the program to find the number of times a particular number occurs within a list. What am I doing wrong here?
def list1():
numInput = input("Enter numbers separated by commas: ")
numList = numInput.split(",")
numFind = int(input("Enter a number to look for: "))
count = 0
for num in numList:
if num == numFind:
count += 1
length = len(numList)
# dividing how many times the input number was entered
# by the length of the list to find the %
fraction = count / length
print("Apeared",count,"times")
print("Constitutes",fraction,"% of this data set")
list1()