Hey everybody,
I'm a python noob and I'm trying to write a program that will show a user a list of phone numbers called greater than X times (X input by users). I've got the program to successfully read in the duplicates and count them (the numbers are stored in a dictionary where {phoneNumber : numberOfTimesCalled}), but I need to compare the user input, an integer, with the value in the dictionary and then print the phone numbers that were called X or more times. This is my code thus far:
import fileinput
dupNumberCount = {}
phoneNumLog = list()
for line in fileinput.input(['PhoneLog.csv']):
phoneNumLog.append(line.split(',')[1])
userInput3 = input("Numbers called greater than X times: ")
for i in phoneNumLog:
if i not in dupNumberCount:
dupNumberCount[i] = 0
dupNumberCount[i] += 1
print(dupNumberCount.values())
userInput = input("So you can view program in command line when program is finished")
Basically, I can't figure out how to convert the dictionary values to integers, compare the user input integer to that value, and print out the phone number that corresponds to the dictionary value. Any help GREATLY appreciated!
By the way, my dictionary has about 10,000 keys:values that are organized like this:
'6627793661': 1, '6724734762': 1, '1908262401': 1, '7510957407': 1
Hopefully I've given enough information for you all to help me out with the program!