JustCaptain kod-buduschego
d74c54749a2a9fa8a89ba4fb24a1b4af61cc19bc
Перейти к файлу
Код
task_4.py
def outer(flag: bool = False) -> None:
    x: int = 10

    def wrapper() -> None:
        nonlocal x
        x = 15

    if flag:
        wrapper()
    print(x)


outer(flag=True)