List({Dictionaries}) | SoloLearn: Learn to code for FREE!

+1

List({Dictionaries})

I have no idea why my list goes out of order when I make my dictionary a list and print it!! Please Help Me! nums = {“a” , ”b” , ”c” , ”d”} print (list(nums)) Prints: ['b', 'c', 'a', 'd']

11/20/2019 7:30:22 PM

Warsin

3 Answers

New Answer

+7

it's not a dictionary...you've got a "set" ...unordered.

+1

A dictionary must have key:value pairs.

0

thanks dude I was so confused until i learned about sets xd