title: How to get the value of the selected radio button?
body: <p>I would like to create 2 different groups of radio buttons. The user would select one option from either group. There would be a function that would get the values(strings) from the selected radio buttons and then print them. Here's my code but it doesn't work (i'm new to python).</p>
  
  <pre><code>from tkinter import *
  root = Tk()
  btn1 = "lol"
  btn2 = "lel"
  def funkcija():
      n = entry1.get()
      m = "null"
      X = btn1.get()
      Y = btn2.get()
      print("%s %s je %s %s." % (n, X, m, Y))
  
  
  theLabel = Label(root, text="Vnesite količino in izberite prvo valuto.")
  theLabel.grid(row=0, columnspan=3)
  
  gumb1=Radiobutton(root,text="Euro",value = "euro",variable = "btn1").grid(row=2, column=1, sticky=W)
  gumb2=Radiobutton(root,text="Dolar",value = "dolar",variable = "btn1").grid(row=3, column=1, sticky=W)
  gumb3=Radiobutton(root,text="Funt",value = "funt",variable = "btn1").grid(row=4, column=1, sticky=W)
  
  label3= Label(root, text="Izberite drugo valuto.")
  label3.grid(row=6, columnspan=3)
  
  label35= Label(root)
  label35.grid(row=5, columnspan=3)
  
  gumb4=Radiobutton(root,text="Euro",value = "euro",variable = "btn2").grid(row=7, column=1, sticky=W)
  gumb5=Radiobutton(root,text="Dolar",value = "dolar",variable = "btn2").grid(row=8, column=1, sticky=W)
  gumb6=Radiobutton(root,text="Funt",value = "funt",variable = "btn2").grid(row=9, column=1, sticky=W)
  
  label1 = Label(root, text="Količina:")
  label1.grid(row=1, sticky=E)
  entry1 = Entry(root)
  entry1.grid(row=1, column=1, sticky=W)
  
  go = Button(root, text="Izračun", fg="white", bg="black", command=funkcija)
  go.grid(row=10, columnspan=3)
  
  root.mainloop()
  </code></pre>