[Python] How to write string literals in Python without having to escape them?

Discussão em 'Python' iniciado por Stack, Dezembro 9, 2024.

  1. Stack

    Stack Membro Participativo

    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.

    Continue reading...

Compartilhe esta Página