Omitting metacharacters in python

Question:

I want to assing a path to a variable a:
a = "D:misctestsetsReal"

How can i omit the t metacharacter without changing the folder name?

Asked By: maksim travnik

||

Answers:

Use raw strings:

a = r"D:misctestsetsReal"
Answered By: ruohola

Try this:

  • r denotes raw string.
a = r"D:misctestsetsReal"
Answered By: Bibhav
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.