Search code examples
pythonmetacharacters

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?


Solution

  • Use raw strings:

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