Data Analysis with Python Guided Project

Hello everybody!

So I’m at the first guided project and there’s a thing I wonder.

In the solution below we used (table[key], key) and then printed index=1 first, secondly index=0.

Why didn’t we save it as (key, table[key])? Is there a particular reason?

Thanks in advance.

No, I don’t think there’s any particular reason. You can use that particular approach. Your final print statement will also change, of course, since the order would be different. But there doesn’t seem to be a reason behind them choosing that particular approach.