I have the below code
>>> ",".join({"x": 1, "y": 2})
'y,x'
>>> list({"x": 1, "y": 2})
['y', 'x']
On what logic is the key printed in the order "y,x" and not "x,y". I tried with multiple values in the dictionary but unable to conclude a logic.
I have the below code
>>> ",".join({"x": 1, "y": 2})
'y,x'
>>> list({"x": 1, "y": 2})
['y', 'x']
On what logic is the key printed in the order "y,x" and not "x,y". I tried with multiple values in the dictionary but unable to conclude a logic.