Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Collections (Retired) Dictionaries Dictionary Iteration

not returnig same order looping a dict

its weird in pycharm when i run this: my_dict1 = { "name": "Kenneth", "age": 33, "state": "Oregon", "country": "USA", "employer": "Treehouse", "job": "Teacher" }

for key in my_dict1: print(my_dict1[key])

its return different order each time.

But when i run on the shell python on conemu , its return all the time the same order, Kenneth said , its should return in same order, askig on irc they say NO.

Thanks for any comment.

1 Answer

My bad , pycharm compile each time i run the code, so that is the reason its return diffent order. :D thanks anyway i keep posted this becouse can be helpful for someone.

PD: sorry my bad english