Skip to content

Instantly share code, notes, and snippets.

@AmrutaKoshe
Created July 8, 2021 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AmrutaKoshe/0266ff438f11e1106dcc95b8a99cdf6b to your computer and use it in GitHub Desktop.
Save AmrutaKoshe/0266ff438f11e1106dcc95b8a99cdf6b to your computer and use it in GitHub Desktop.
Name=[]
for file in os.listdir(directory):
Name+=[file]
fruit_map = dict(zip(Name, [t for t in range(len(Name))]))
print(fruit_map)
r_fruit_map=dict(zip([t for t in range(len(Name))],Name))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment