Newbie here and need some help

yeah…but that’s what i am trying to get is a name. So for instance:

print("Enter the phone number (7 digits, with a dash): ")
userInput = input("")

So when a user inputs the number (i.e. 555-1234), how do i populate the number variable in your example?

number = userInput
?

1 Like

Wow! Thank you so much! I finished it! i do have one additional question. If i have a dictionary (written from a text file) and want to sum values for specific keys in that dict…what is the syntax for it? For example my text file looks something like this:

cash.txt
0001 10 R
0002 30 P
0004 20 P
0005 50 R

If i wanted to sum all of the Rs, how do you go about writing that?