+ 2
Problem with dictionary
b = {7, 8, 9} print(b) #Output: {8, 9, 7} Why output is not {7, 8, 9} 🤔??
4 Answers
+ 6
It's not dictionary. It's a set.
And Set does not maintain it's order. so order is unpredictable.
dictionary will have key-value pairs.
+ 3
As Jayakrishna🇮🇳 has already stated
b = {8, 7, 9}
print(type(b))
#Output: <class "set">
+ 3
Thank you Jayakrishna🇮🇳 & Rik Wittkopp ❤️🙂
+ 2
Now i understand