i am trying to add a text to my output
def as():
a = 0
return a
def d():
return d
i am trying to add a text to my output
def as():
a = 0
return a
def d():
return d
You are using a list for some reason instead of a dictionary. Use generator to reverse key/value pairs:
def index_by_author(f):
from library import load_library
return {value: key for key, value in load_library().items()}