from tkinter import *
root = Tk()
def oku():
    l1=Label(root,text=0)
    myfilerr=open("kayit.txt","r")
    content=myfilerr.readlines()
    myfilerr.close()
    return content
def kisiSec(kisi):
    okudeg=oku()
    print(kisi)
def main():
    i=0
    okudeg=oku()
    menubar = Menu(root)
    menu2=Menu(menubar,tearoff=0)
    for i in okudeg:
        menu2.add_command(label=i, command=lambda: kisiSec(i))
    root.config(menu=menubar)
    menubar.add_cascade(label="Kişiler", menu=menu2) 
main()
root.mainloop()
Dont judge me im new but there are 3 diffrent names in the text but in main, c1 buttons gives out same name to kisisec() How can i fix that? --ITS TURKISH--
 
    