Sail E0 Webinar
Question
What is the output when following code is executed ?print r"\nhello"The output is
Options:
A .  a new line and hello
B .  \nhello
C .  the letter r and then hello
D .  Error
Answer: Option B


When prefixed with the letter 'r' or 'R' a string literal becomes a raw string and the escape sequences such as \n are not converted.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers