'Tkinter entry not getting the gender

Hello I have some data in a CSV and I want to make a gender printing Tkinter program

the problem is I don't have any idea about that so can someone tell, me how to make a gender Tkinter program using a radio button.. here's my script what i tried pls tell how to extend for functionality

from tkinter import *
root = Tk()
gender = tk.IntVar()
radiobutton_1 = tk.Radiobutton(app, text='Male', variable=gender, value=1)
radiobutton_1.grid(row=0, column=4)
radiobutton_2 = tk.Radiobutton(app, text='Female', variable=gender, value=2)
radiobutton_2.grid(row=0, column=5)
root.mainloop()


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source