Certified Associate in Python Programming (PCAP) — Question 111

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

Answer options

Correct answer: B, D

Explanation

Option B is correct because the length of the string containing two 'ג€' characters is greater than zero. Option D is also correct as the length of the string containing a single backslash is indeed 1. Options A and C do not evaluate to True; A involves a mathematical comparison that does not hold, and C incorrectly compares the character after 'a' to 'B'.