Question

{'1': 'Note 7,Samsung,2017,New York , 15000, Popular','3': 'Galaxy S10, Samsung, 2019, London, 12000, Popular','5': 'I phone...

{'1': 'Note 7,Samsung,2017,New York , 15000, Popular','3': 'Galaxy S10, Samsung, 2019, London, 12000, Popular','5': 'I phone 6s, Apple, 2016, Washington, 3000, Not Popular'}

Suppose this is my python dictionary

how do i make this print all of the dictionary (which may be updated) accordingly to this format

Type: 1

Name: Note 7

Manufacturer: Samsung

Year of Manufacture: 2017

Place of Manufacture: New York

Price: 15000

success: Popular

Type: 3

Name: Galaxy S10

Manufacturer: Samsung

Year of Manufacture: 2019

Place of Manufacture: London

Price: 12000

success: Popular

Type:5

continues on

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Program:

phones = {'1':{'Name':'Note 7',
'Manufacturer':'Samsung',
'Year of Manufacture':'2017',
'Place of Manufacture':'New York' , 'Price':'15000','success': 'Popular'},
'3':{'Name':'Galaxy S10',
'Manufacturer':'Samsung',
'Year of Manufacture':'2019',
'Place of Manufacture':'LONDON' , 'Price':'12000','success': 'Popular'},
'5':{'Name':'I phone 6s',
'Manufacturer':'Apple',
'Year of Manufacture':'2016',
'Place of Manufacture':'Washington' , 'Price':'3000','success': 'Not Popular'}
}
for a in phones:
print('Type:',a)
for b in phones[a]:
print (b,':',phones[a][b])

OUTPUT

Type: 1 Name Note 7 Manufacturer: Samsung Year of Manufacture 2017 Place of Manufacture New York Price 15000 success Popular

Add a comment
Know the answer?
Add Answer to:
{'1': 'Note 7,Samsung,2017,New York , 15000, Popular','3': 'Galaxy S10, Samsung, 2019, London, 12000, Popular','5': 'I phone...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • How did Samsung overtake Panasonic and Philips? What core competencies (resources and capabilities) did the firm...

    How did Samsung overtake Panasonic and Philips? What core competencies (resources and capabilities) did the firm possess that helped it to be successful? (Discuss the international strategy that Samsung executed.) Samsung Leadership Era: 2000–Present Samsung group was founded in 1938 by Byung-Chull Lee as a simple trading company in Taegu, Korea that exported basic goods such as dried fish, vegetables, and fruit before expanding into several business lines, including insurance, securities, and retail.43 In 1969, Lee decided to enter the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT