Reputation: 994
How to eliminate curly braces around "There are total" and "entries in dictionary"
self.status_bar = Label(self.status_bar, text=("There are total", len(dictionary_data), "entries in dictionary."), bg="yellow", relief=FLAT)
Upvotes: 0
Views: 621
Reputation:
The problem is that you are currently passing a tuple for the text
parameter. Instead, you should be passing a string. You can use str.format
to insert the dictionary length into this string:
self.status_bar = Label(self.status_bar, text="There are total {} entries in dictionary.".format(len(dictionary_data)), bg="yellow", relief=FLAT)
Upvotes: 4