JustCaptain kod-buduschego
53f23cfd3cd1680139f6a3e77997f1cb3a9b19b3
Перейти к файлу
Код
kod-buduschego Python 2025-20262.4. Словариpracticesteachbase.rutask_3.py
anc update c70a58f 8 октября 2026 г.
task_3.py
student: dict[str, str | int] = {
    "name": "Ivan",
    "age": 21,
    "city": "Moscow",
    "email": "ivan@example.com",
    "phone": "123-456-789"
}
profile: dict[str, str | int] = {
    "username": "ivan123",
    "status": "active",
    "points": 250
}

phone = student.pop("phone")
print(f"Телефон студент: {phone}")

if student.get("adress"):
    del student["adress"]

last_item = student.popitem()
profile.clear()

print(student, profile)