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