String literals in python
Posted
by
kjakeb
on Stack Overflow
See other posts from Stack Overflow
or by kjakeb
Published on 2011-01-16T02:47:29Z
Indexed on
2011/01/16
2:53 UTC
Read the original article
Hit count: 208
Hello,
Is there a way to declare a string variable in python such that everything inside of it is automatically escaped, or has its literal character value? I'm NOT asking how to escape the quotes with slashes, that's obvious. What I'm asking for is a general purpose way for making EVERYTHING in a string literal so that I don't have to manually go through and escape everything for very large strings. Anyone know of a solution? Thanks!
© Stack Overflow or respective owner