In Python, I need a dictionary object which looks like:
{\'a\': 10, \'b\': 20, \'c\': 10, \'d\': 10, \'e\': 20}
I\'ve been able to get th
Similar to @SilentGhost but a more declarative syntax (with Python 3.5+) I prefer:
myDict = { **dict.fromkeys(['a', 'b', 'c'], 10), **dict.fromkeys(['b', 'e'], 20) }