DEV Community

sunj
sunj

Posted on

Python 전역변수

nextId=0
.
.
.

global nextId
.
.
.
nextId = netxtId+1
Enter fullscreen mode Exit fullscreen mode

전역변수를 변경하기 위해서는 변경 전에 전역변수임을 알려줌

참조 : 유투브 생활코딩

Top comments (0)