Looping over a dictionary


#1

  1. can't seem figure out what is wrong
  2. and why is c printed before b.

#2

print shouldn't have parentheses, by using parentheses, you caused print to print a tuple (immutable list)

dictionaries are accessed by keys, not by index, so there is not reason for dictionaries to be ordered (they are in python3,6, not sure why yet)


#3

thank you. yes removing of parenthesis worked.
but i have been also trying same thing in python 3.6 which requires parenthesis
so how does it would work there.


#4

but in python2, print is a statement where in python3 its a function call, then it does require parentheses


#5

o thank you.. very much


#6