Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Day 10 Exercises level 3 #434

Open
parzival-p1 opened this issue Aug 17, 2023 · 2 comments
Open

Day 10 Exercises level 3 #434

parzival-p1 opened this issue Aug 17, 2023 · 2 comments

Comments

@parzival-p1
Copy link

I'm trying to solve exercise number 3, but I can't iterate through the file: countries_data.py I got this error message: non iterable value is used in an iterating context any ideas that could help me to solve this issue? and also How can I iterate a list of dictionaries like the one in countries_data.py. Thanks in advance!

@Isaias-program
Copy link

Isaias-program commented Aug 25, 2023

Hi,
On Day_10_loops, there is an exercise where you work with a file called countries_data.py. It's actually a lists of dictionaries.
What I did was copy the full list and added a name something like this: countries = [{Dic1}, {Dic2}, {Dic3},...]
After this I was able to iterate the content of list countries.
I hope this can help you

@parzival-p1
Copy link
Author

I tried that solution and it worked well for me, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants