M

Mr. Dubey • 100.69K Points
Coach

Q. What will be the output of the following Python code? >>>print (r"\nhello")

  • (A) a new line and hello
  • (B) \\nhello
  • (C) the letter r and then hello
  • (D) error
Share

Explanation by: Mr. Dubey
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.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics