What is the output of the following command typed in Python interactive mode?
>>> print(`and` in `And now for something completely different`)
What is the output of the following command typed in Python interactive mode?
>>> print(`and` in `And now for something completely different`)
The command uses backticks (`) around the string instead of single or double quotes, which causes a syntax error in Python. The correct syntax should involve using either single (' ') or double (' ') quotes for string literals.
When I run this code: print('and' in `And now for something completely different`) I get a syntax error: print('and' in `And now for something completely different`) ^ SyntaxError: invalid syntax
can someone explain?
The code has the wrong quotes on examtopics, if you type: print('and' in 'And now for something completely different') it returns false