contacts = {'John Smith': '1-123-123-123',
'Jane Smith': '1-102-555-5678',
'John Doe': '1-103-555-9012'}
def add_contact(contacts, name, number):
"""
Add a new contact (name, number) to the contacts list.
"""
if name in contacts:
print(name, "is already in contacts list!")
else:
contacts[name] = number
print(add_contact(contacts, 'new_guy', '1234'))
When I print this I get none
but if I add another line print(contacts)
it will give me a none and the new dictionary with 'new_guy' :'1234'. What is the correct way to print out the new dictionary without printing none?