Week End Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: validbest

Exam PCAP-31-03 All Questions
Exam PCAP-31-03 All Questions

View all questions & answers for the PCAP-31-03 exam

Python Institute PCAP PCAP-31-03 Question # 17 Topic 2 Discussion

PCAP-31-03 Exam Topic 2 Question 17 Discussion:
Question #: 17
Topic #: 2

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")


A.

'key' in diet


B.

diet['key'] != None


C.

diet.exists('key')


D.

'key' in diet.keys()


Get Premium PCAP-31-03 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.