The r'..'
string modifier causes the '..'
string to be interpreted literally. That means, r'MyPathWithoutEscaping'
will evaluate to 'MyPathWithoutEscaping'
- without causing the backslash to escape characters. The prior is equivalent to 'My\Path\Without\Escaping'
string, but without the raw modifier.
Note: The string cannot end with an odd number of backslashes, i.e r'BadStringExample'
is not a correct string.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…