JustCaptain kod-buduschego
b2eaa8da9b02e1bfb94cf3e9a886e8d0158a4f36
Перейти к файлу
Код
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)