maksim travnik
maksim travnik

Reputation: 1

Omitting metacharacters in python

I want to assing a path to a variable a: a = "D:\misc\testsets\Real"

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

Upvotes: -2

Views: 40

Answers (2)

Bibhav
Bibhav

Reputation: 1757

Try this:

  • r denotes raw string.
a = r"D:\misc\testsets\Real"

Upvotes: 0

ruohola
ruohola

Reputation: 24038

Use raw strings:

a = r"D:\misc\testsets\Real"

Upvotes: 0

Related Questions