Computer Science

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")

Python Funda

4 Likes

Answer

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

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

Answered By

1 Like


Related Questions