3 ms·
On the dict property name thing, you can do: {'a':1, 'b':2, 'c':3} or dict(a=1, b=2, c=3) I find the second syntax easier to read and write for dicts wh
by cameldrv 7y ago
On the dict property name thing, you can do:
{'a':1, 'b':2, 'c':3}
or
dict(a=1, b=2, c=3)
I find the second syntax easier to read and write for dicts where all of the keys are static strings that are valid Python variable names.