Certified Associate in Python Programming (PCAP-31-03) — Question 49
Which of the following expressions evaluate to True? (Choose two.)
Answer options
- A. 'dcb' not in 'abcde'[::-1]
- B. 'True' not in 'False'
- C. str(1-1) in '0123456789'[:2]
- D. 'phd' in 'alpha'
Correct answer: B, C
Explanation
The correct answers are B and C because 'True' is indeed not in 'False', making B true, and str(1-1) evaluates to '0', which is within the first two characters of '0123456789', so C is also true. A is incorrect as 'dcb' is not in the reversed string, and D is false as 'phd' is not present in 'alpha'.