Q. What will `my_dict = {'a': 1}; 'a' in my_dict` return?

  • (A) False
  • (B) True
  • (C) None
  • (D) KeyError
πŸ’¬ Discuss
βœ… Correct Answer: (B) True
Explanation: The key `'a'` exists in the dictionary, so it returns `True`.
Explanation by: Mr. Dubey
The key `'a'` exists in the dictionary, so it returns `True`.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
76
Total Visits
πŸ“½οΈ
12 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
97%
Success Rate