Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created August 10, 2020 05:09
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 IndhumathyChelliah/7549281bc977cfce53f8da6e77524f57 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/7549281bc977cfce53f8da6e77524f57 to your computer and use it in GitHub Desktop.
l1=[1,2,3,4]
d1={k:"a" for k in l1}
print (d1)
#Output:{1: 'a', 2: 'a', 3: 'a', 4: 'a'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment