Categories
Mastering Development

is there a way to use same variables in different functions without using global?

check1 = False def adding(): global f_num, s_num, check1 check1 = True e.delete(0, END) f_num = e.get() s_num = e.get() e.delete(0, END) def show_answer(): if check1: e.insert(0,f_num+s_num) I’m new to coding and using this website…I’m using tkinter module to build a calculator. when I set the show_answer() function in the equal sign button it was […]