View all questions & answers for the PCAP-31-03 exam
What would you use instead of XXX if you want to check whether a certain ‘ key' exists in a dictionary called diet? (Select two answers)
II
if XXX:
print("Key exists")
'key' in diet
diet['key'] != None
diet.exists('key')
'key' in diet.keys()
Submit