Tkinter displays text with {} Tkinter displays text with {} tkinter tkinter

Tkinter displays text with {}


The curly braces there are a little bit of Tcl leaking through. You have passed a Python list to set the display in this line:

display.configure(text=("Bicycle", x, "was used", a[x], "times."))

This is being converted into a Tcl list when applied to the Tk widget and in Tcl a list element with a space in it gets shown with curly brace quoting.

As pointed out by @jonrsharpe you should set the label text to be a string to avoid this.