This repository has been archived on 2025-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
Files
python_it_top/21-10/contact_threetask.py

32 lines
1.0 KiB
Python
Raw Permalink Normal View History

2025-10-21 21:47:42 +05:00
note_book = {"Маша":
{'tel':'+7922123561','vk':'vk.com/masha321','youtube':'youtube.com/masha321','telegram'
:'t.me/masha321'},
"Маша":
{'tel':'+7922123561','vk':'vk.com/masha321','youtube':'youtube.com/masha321','telegram'
:'t.me/masha321'},
"Маша":
{'tel':'+7922123561','vk':'vk.com/masha321','youtube':'youtube.com/masha321','telegram'
:'t.me/masha321'},
"Маша":
{'tel':'+7922123561','vk':'vk.com/masha321','youtube':'youtube.com/masha321','telegram'
:'t.me/masha321'},
"Маша":
{'tel':'+7922123561','vk':'vk.com/masha321','youtube':'youtube.com/masha321','telegram'
:'t.me/masha321'},
}
user_input = input("Введите имя из списка контактов: ")
if user_input:
user_search = user_input[0].upper() + user_input[1:].lower()
else:
user_search = ""
if user_search in note_book:
contact = note_book[user_search]
print(f"Контакт: {user_search}")
for key, value in contact.items():
print(f"{key.capitalize()}: {value}")
else:
print("Контакт не найден.")