0

i am trying to add a text to my output

def as():

      a = 0
        return a


def d():
    return d
jason
  • 27
  • 1
  • 8

1 Answers1

0

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()}
midori
  • 4,807
  • 5
  • 34
  • 62