#지역변수def sub(): s="바나나" print(s) sub()print(s) #오류 발생
Standard input is empty
바나나
Traceback (most recent call last): File "./prog.py", line 7, in <module> print(s) #오류 발생 NameError: name 's' is not defined
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!