I'm trying to use a dictionary by passing arguments to a function that is used by a key lets say for example:
def myfunc(myval):
print(myval)
mydict = {'key1':myfunc(a)}
mydict['key1'] = myfunc(2)
line 7, in mydict = {'key1':myfunc(a)} NameError: name 'a' is not defined
how its possible to be made?