Jun-18-2021, 09:49 PM
Hi,
I have a tkinter entry and I will get a number from user as string since I am using entry. Then I am checking a file entry that has a number which is considered as string as well (from my basic understating). I need to compare them and check if same or not.
has the number I want to check against
so for example in the entry I put 123
in the file the number is 123
how to check that if they are the same or not.
Thanks
I have a tkinter entry and I will get a number from user as string since I am using entry. Then I am checking a file entry that has a number which is considered as string as well (from my basic understating). I need to compare them and check if same or not.
entry = Entry(session_start) entry.config(show="*") entry.grid(row=8,column=1) #entry is from user and thenum is from file if entry == thenum: complete_purchase() else: Label(session_start, text= "not same!").grid(row=11,column =0)Then I read a line from a file that
has the number I want to check against
so for example in the entry I put 123
in the file the number is 123
how to check that if they are the same or not.
Thanks