https://stackoverflow.com/questions/38987/how-do-i-merge-two-dictionaries-in-a-single-expression
For dictionaries x and y, their shallowly-merged dictionary z takes values from y, replacing those from x.
In Python 3.9.0 or greater (released 17 October 2020,
PEP-584, discussed here):z = x | yIn Python 3.5 or greater:
z = {**x, **y}
No comments:
Post a Comment