Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
customers={
"John",
"Smith",
"Doh",
"Julian"
}
value="user"
customers_key = dict.fromkeys(customers, value)
print(customers_key)
# Outputs: {'Smith': 'user', 'Julian': 'user', 'John': 'user', 'Doh': 'user'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment