radio buttonsthe easy way from tkinter import root tk(intvars work too var intvar( select to start for in range( )rad radiobutton(roottext=str( )value=ivariable=varrad pack(side=leftroot mainloop(print(var get()show state on exit this works the same waybut it is lot less to type and debug notice that this script associates the buttons with an intvarthe integer type sibling of stringvarand initializes it to zero (which is also its default)as long as button values are uniqueintegers work fine for radio buttons too hold onto your variablesone minor word of cautionyou should generally hold onto the tkinter variable object used to link radio buttons for as long as the radio buttons are displayed assign it to module global variablestore it in long-lived data structureor save it as an attribute of long-lived class instance object as done by demoradio just make sure you retain reference to it somehow you normally will in order to fetch its state anyhowso it' unlikely that you'll ever care about what ' about to tell you but in the current tkintervariable classes have __del__ destructor that automatically unsets generated tk variable when the python object is reclaimed ( garbage collectedthe upshot is that all of your radio buttons may be deselected if the variable object is collectedat least until the next press resets the tk variable to new value example - shows one way to trigger this example - pp \gui\tour\demo-radio-clear py hold on to your radio variables (an obscure thingindeedfrom tkinter import root tk(def radio ()local vars are temporary #global tmp making it global fixes the problem tmp intvar(for in range( )rad radiobutton(roottext=str( )value=ivariable=tmprad pack(side=lefttmp set( select th button radio (root mainloop( tkinter tourpart