Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pet1 = {
- 'Sora': {
- 'Name': 'bullshitx1',
- 'age': 12,
- },
- }
- pet2 = {
- 'Zhanny': {
- 'Name': 'bullshitx2',
- 'age': 8,
- },
- }
- pets = [pet1, pet2]
- for pe in pets:
- for name, info in pe.items():
- print(f"\nName of owner: {name.title()}")
- pet_name = info['name']
- age = info['age']
- print(f"Name of pet: {pet_name.title()}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement