πŸ“Š Python
Q. What will be the output of the following code snippet?
Code:
a = {'Hello':'World', 'First': 1}
b = {val: k for k , val in a.items()}
print(b)
  • (A) {'Hello':'World', 'First': 1}
  • (B) {'World': 'Hello', 1: 'First'}
  • (C) Can be both A or B
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) {'World': 'Hello', 1: 'First'}

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
411
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Akash Lawaniya
Publisher
πŸ“ˆ
99%
Success Rate