0

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.

ambikanair
  • 3,231
  • 9
  • 37
  • 66

0 Answers0