Code Snippet
I understand that the return type of keys()
function similar to a set-like view, so when evaluating equality the order wouldn’t matter, but how about values()
? Even though the values in map1
and map2
are the same, the value returned is still False
. But why does calling sorted()
return True
although the order of the values remain unchanged?
New contributor
topquartile is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.