- Joined
- Dec 12, 2022
- Messages
- 8
- Reaction score
- 0
I am trying to use a for loop to loop through this list of dictionaries and print all the information about each person neatly. This is what I have so far.
How do I write a loop that will go through the list and print the details of each person neatly? Thanks
Python:
sarah = {
'age': 50,
'job': 'mcdonalds',
'city': 'atlanta',
}
steven = {
'age': 24,
'job': 'target',
'city': 'new york',
}
john = {
'age': 20,
'job': 'walmart',
'city': 'new york',
}
people = [sarah, steven, john]
How do I write a loop that will go through the list and print the details of each person neatly? Thanks