Is there a way to print the content of a dictionary in plain text excluding the json format?
print(JSON.print(dictionary, "\t")) will return:
print(dictionary) will return:
I'd like to have it formatted like this:
Item1 : 4
Item2 : 3
The result will be used in a label to list all the content of the dictionary.
This code works for the console, but not for the label, as it only shows the last key:value pair of the dictionary:
for i in dictionary:
print("%s : %d" % [i, dictionary[i]])
So I'm struggling to translate this to a label