...
win = Tk()
...
def select_level():
level = level_var.get()
print(level)
level_var = IntVar(win)
check1 = Radiobutton(win, text='первый', variable=level_var, value=1, command= select_level)
check2 = Radiobutton(win, text='второй', variable=level_var, value=2, command= select_level)
check1.grid(row = 30, column=3)
check2.grid(row = 31, column=3)
...