PCEP 30 02 PCEP Certified Entry Level Python Programmer · Free Practice Question Easy
Question 7
What is the output of the following code snippet?
- city1 = "New York"
- city2 = "New York"
- print(city1 is city2)
-
A
SyntaxError
-
B
False
-
C
True
-
D
New York
Reveal correct answer
Correct answer: C
Explanation
city1 has the same value as city2. so city1 is city2 is True
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
You must be logged in to post a comment.
