Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created August 10, 2020 04:53
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/7b7b147113185de5948d4d702b1b5150 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/7b7b147113185de5948d4d702b1b5150 to your computer and use it in GitHub Desktop.
l1=['red','blue','orange']
d1=dict.fromkeys(l1,"colors")
print (d1)
#Output:{'red': 'colors', 'blue': 'colors', 'orange': 'colors'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment