Код: Выделить всё
contact_emails = {
'Sue Reyn' : 's.reyn@email.com',
'Mike Filt': 'mike.filt@bmail.com',
'Nate Arty': 'narty042@nmail.com'
}
new_contact = input()
new_email = input()
contact_emails[new_contact] = new_email
for contact in contact_emails:
print(new_contact + ' is ' + new_email)
Код: Выделить всё
s.reyn@email.com is Sue Reyn
mike.filt@bmail.com is Mike Filt
narty042@nmail.com is Nate Arty
alf1@hmail.com is Alf
Код: Выделить всё
Alf is alf1@hmail.com
Alf is alf1@hmail.com
Alf is alf1@hmail.com
Alf is alf1@hmail.com
Подробнее здесь: https://stackoverflow.com/questions/603 ... of-diction