MCQs > IT & Programming > Python > Which statement about the 'has_key()' dictionary method and the 'in' operator are true? d = {'a': 1, 'b': 2} 'a' in d d.has_key('a')

Python MCQs

Which of the following statements about the 'has_key()' dictionary method and the 'in' operator are true? d = {'a': 1, 'b': 2} 'a' in d d.has_key('a')

Answer

Correct Answer: 'in' has better performance.

Explanation:

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it