How can I return a parameter after using a button in tkinter?
def read(excelfile):
data = pd.ExcelFile("rsc/" + excelfile + ".xlsx")
file = pd.read_excel(data)
return file
browse_btn = tk.Button(root, text="Browse", command=lambda:read(), bg="#20bebe", fg="white", width=15, height=2)
It won't keep working in the function def read()
.