list - Comparing user input integers to dictionary values? (Python) -


I'm a python knot and I'm trying to write a program that will show a list of phone numbers to a user X Over time, I got this program to read successfully in duplicates and count them (numbers are stored in a dictionary where {phoneNumber: numberOfTimes collapse}), but I have user input, a Poo Print the value in the dictionary and then the phone number that was X or more often than the code, it is my code so far:

  import fileinput dupNumberCount = {} phoneNumLog = list () Fileinput.input in line (['PhoneLog.csv']): phoneNumLog.append (line if I am not in dupnumbercount: dupnumbercount [i] = 0 dupnumbercount [i] + = 1 print ('', ') [1]) userInput3 = Input ("Dupnumbercount.values ​​(" number greater than the X-bar) "userInput = input (" When the program is finished you can see the program in the command line Actually, I can not understand how to convert the dictionary value to the integer, compare the value of the user input integer, and print the phone number related to the value of the dictionary. Please.  
  '66277 9 3661': 1, '6724734762': Any help greatly appreciated!  

By the way, there are about 10,000 keys in my dictionary: 1, '1908242401': 1, '7510957407': 1

I hope the program for you With enough information to help me!

I think this is what you are looking for:

 < Code> a dupnumbercount.keys (): If duplex count [a] & gt; = User Input: Print  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -