πŸ“Š Python
Q. What is the output of the following program?
Code:
temp = dict()
temp['key1'] = {'key1' : 44, 'key2' : 566}
temp['key2'] = [1, 2, 3, 4]
for (key, values) in temp.items():
print(values, end = "")
  • (A) Compilation error
  • (B) {„key1β€Ÿ: 44, „key2β€Ÿ: 566}[1, 2, 3, 4]
  • (C) Runtime error
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) {„key1β€Ÿ: 44, „key2β€Ÿ: 566}[1, 2, 3, 4]

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
237
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Shivam
Publisher
πŸ“ˆ
95%
Success Rate