Hurricane Analysis Q3 Help with Dictionary Iterations

My code keeps returning the last value only, I don’t know how to get it to add all values into a new dictionary.

In the loop you’re resetting your dictionary every time. Put the hurricane_info instantiation outside of your loop and that should address the immediate problem.

Moreover you can always use a debugger to isolate what exactly is happening in your code. You can see youtube examples of how to use it, here’s the documentation: pdb — The Python Debugger — Python 3.11.3 documentation


Thank you so much such a simple fix, much appreciated.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.