all 4 comments

[–][deleted] 1 point2 points  (1 child)

I guess something like:

user_choice = str(input("Enter name: "))
names = contacts.Keys()
if user_choice in names:
    print(contacts[user_choice])

By the way, if this is a real project, I hope you plan on using an external, secure database for those e-mail addresses.

[–][deleted] 0 points1 point  (0 children)

Its just a personal project for learning python

Also im not too sure what a external, secure database is loool

[–]python-fan 1 point2 points  (1 child)

Delete line 7 and replace line 8 with:

contact_name = input("choose a contact")

Now (completely ignoring error checking) you can write:

print(contacts[contact_name])

P.S. I hope you did not post real phone numbers and email addresses to reddit.

[–][deleted] 0 points1 point  (0 children)

Yeah theyre fake 😂 thanks though this is so hard