Certified Associate in Python Programming (PCAP) — Question 44

Which of the following expressions evaluate to True? (Choose two.)

Answer options

Correct answer: A, D

Explanation

Option A evaluates to True because '0' (the result of str(1-1)) is present in '12'. Option D also evaluates to True since the string 'True' does not exist within 'False'. Options B and C are incorrect as they evaluate to False; 'dcb' is not absent from the reversed string and 'phd' is not found within 'aplpha'.