I am trying to enumerate
a list of of dictionary definitions which are strings and remove the curly braces. The definitions in the list are taken from a json (dictionary api) which is why i am using join to remove the curly brackets.
When I try doing them at the same time it gives a "type error: sequence item 0: expected str instance, tuple found".
I have tried joining first and then enumerating but that comes with an error too.
I don't believe I can use a for loop because I am assigning all 3 definitions to a single variable (to use in tkinter) and using a for loop would only show definition 3, also because I am not printing the results.
Example:
definitions = [{definition1},{definition2},{definition3}]
I want to make it so that it shows:
result = 1. definition1
2. definition2
3. definition3
I have achieved the same result by doing:
result = "1. " + definitions[0] + "\n" + "2. " + definitions[1] + "\n" + "3. " + definitions[2]
but would rather be able to do it in a way that doesn't require me to type out everything manually