CBSE Class 12 Computer Science Question 29 of 105

Python Revision Tour — Question 13

Back to all questions
13
Question

Question 13

Which of the following statement prints the shown output below?
    hello\example\test.txt

  1. print("hello\example\test.txt")
  2. print("hello\\example\\test.txt")
  3. print("hello\"example\"test.txt")
  4. print("hello"\example"\test.txt")
Answer

print("hello\\example\\test.txt")

Reason — Escape sequence (\\) is used for Backslash (\).