PCEP-30-02 Exam QuestionsBrowse all questions from this exam

PCEP-30-02 Exam - Question 183


What is the expected output of the following code?

Show Answer
Correct Answer:

Discussion

3 comments
Sign in to comment
akumoOption: D
Mar 20, 2025

D. 1 is the answer

akumoOption: D
Mar 20, 2025

x="""""" print(len(x)) if you write like this the output will be 0

Knight82Option: D
Apr 28, 2025

It is one because Python detects or considers the second line """ as a new line, which is \n. So, it's 1 character. Regularly, """...""" then it's empty, but once you press enter. It's \n a new line. So, Python takes it as 1 character. The result is 1.