해결하고자 하는 문제
이벤트 함수 안에 있는 글로벌 변수안의 값을 함수 밖의 또다른 변수에 저장하고 싶어요.
I want to save the value in the global variable inside the event function to another variable outside the function.
코드 혹은 오류
def coordinate(event):
fx = event.x
fy = event.y
global sx
global sy
sx = fx
sy = fy
print (sx,sy)
return sx,sy
canvas.bind("", start_point,add='')
canvas.bind("", coordinate,add='')
환경
사용중인 운영체제, 언어, 라이브러리의 버전을 적어주세요.
vscode - python
시도해본 방법