Why are two Entry boxes with the same 'text =' values treated as the same entry box? Why are two Entry boxes with the same 'text =' values treated as the same entry box? tkinter tkinter

Why are two Entry boxes with the same 'text =' values treated as the same entry box?


text option is the same as textvariable option for Entry widget. Since you passed a string "£" to it but not an instance of StringVar, an instance of StringVar will be created with the string as its name implicitly for you. So both Entry widgets are using same StringVar. Therefore changing one of the them will also change the other as they share the same StringVar.