GIAC Python Coder (GPYC) — Question 13
What is the output of the following command typed in Python interactive mode?
>>> print(`and` in `And now for something completely different`)
Answer options
- A. SyntaxError: invalid syntax
- B. True
- C. False
Correct answer: C
Explanation
The expression checks if the substring 'and' exists in the string 'And now for something completely different'. Since string comparison is case-sensitive and 'and' does not match 'And', the output is False. The other options are incorrect as there is no syntax error in the command, and the presence of 'and' is not true.