I have a dictionary with many entries of the following form:
dictionary = {"label":{entryBox:1},...}
Where the entryBox corresponds to an object elsewhere in my code.
I want to make a function that returns the value (1) given just the entryBox passed as an argument.
Ex.
def fxn(entryObject):
return dictionary["entryObject"][entryObject]
My question lies in the ["entryOnject"] as this does not represent the argument passed but rather "entryObject" in quotes.
How do I make whats between the quotes a variable and have it still surrounded by double quotes.
I have tried converting it to a string with str() and using an fstring but neither worked for my application.
Thank you in advance.