LearnFrenzy
Sign in Take a free test

Strings · Strings MCQ · Question 11

What is a raw string? Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 11 Back to Exercise

What does the r prefix do in r"C:\new"?

  • A It makes the string read-only
  • B It reverses the string
  • C Backslashes are kept literally instead of starting escape sequences Correct
  • D It removes spaces
Correct Answer: Option C

Without r, "\n" would become a newline. Raw strings are standard for regex patterns and Windows paths.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links