Why does clicking the first registration button execute the function of the second registration button , Ask for solutions
from tkinter import *
import os
from unittest import expectedFailure
user="user.txt"
passwd="passwd.txt"
def show1():
root=Tk()
root.geometry("400x200+800+350")
root.title(" Big ")
label=Label(root,text=" register ",font=(" Chinese Xingkai ",20),fg="green",bg="pink")
label.pack()
#global value1
#value1=Tk.StringVar()
number3=Label(root,text=" user name ")
number3.place(relx=0.2,rely=0.2,anchor=CENTER)
text3=Entry(root)
text3.place(relx=0.5,rely=0.2,anchor=CENTER,width=150,height=25)
#global value2
#value2=Tk.StringVar()
number4=Label(root,text=" password ")
number4.place(relx=0.2,rely=0.4,anchor=CENTER)
text4=Entry(root)
text4.place(relx=0.5,rely=0.4,anchor=CENTER,width=150,height=25)
enter=Button(root,text=" register 1",command=register())
enter.place(relx=0.5,rely=0.8,anchor=CENTER)
#a=str(text3.get())
#b=str(text4.get())
def register():
root=Tk()
root.geometry("200x50+900+450")
root.title(" Big ")
label=Label(root,text=" Registered successfully ",font=(" Chinese Xingkai ",20),fg="green",bg="pink")
label.pack()
def sighin():
print("sighin")
root=Tk()
root.geometry("400x200+800+350")
root.title(" Big ")
label=Label(root,text=" Sign in ",font=(" Chinese Xingkai ",20),fg="green",bg="pink")
label.pack()
number1=Label(root,text=" user name ")
number1.place(relx=0.2,rely=0.2,anchor=CENTER)
text1=Entry(root)
text1.place(relx=0.5,rely=0.2,anchor=CENTER,width=150,height=25)
label.pack()
number2=Label(root,text=" password ")
number2.place(relx=0.2,rely=0.4,anchor=CENTER)
text2=Entry(root)
text2.place(relx=0.5,rely=0.4,anchor=CENTER,width=150,height=25)
enter1=button1=Button(root,text=" register ",command=show1)
enter1.place(relx=0.5,rely=0.8,anchor=CENTER)
enter2=button2=Button(root,text=" Sign in ",command=sighin)
enter2.place(relx=0.5,rely=0.6,anchor=CENTER)
root.mainloop()