Files
StudyRepo_Synergy/part1_basic/lesson8/app.py
2023-10-15 10:23:29 +03:00

21 lines
633 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
Модуль является результатом выполнения практической
домашней работы по теме "Словари и функции"
:copyright: Сергей Ванюшкин <pi3c@yandex.ru>
:git: https://git.pi3c.ru/pi3c/StudyRepo_Synergy.git
:license: MIT
2023г.
"""
my_dict = {"name": "John", "age": 25, "city": "New York"}
print(my_dict)
my_dict["age"] = 26
my_dict["email"] = "john@example.com"
print(my_dict.get("country", "Нет в словаре ключа 'country'"))
my_dict.pop("city")
for k, v in my_dict.items():
print("ключ:", k, "значение:", v)