local variable 의 life cycle은 variable이 위치한 해당 function이다.
c 언어의 block 이라는 것과 다른 점이다.
def fun():
if True:
a =3
print(a)
--> 3이 출력된다.
'프로그래밍언어 > 파이썬(python)' 카테고리의 다른 글
(20191010_programming_tutoring)01_OT (0) | 2019.10.10 |
---|---|
style guide for python code - official (0) | 2019.07.20 |