How do you escape a string in python?



How do you escape a string in python?..

Answer / Santosh Singh Dhakariyal

To escape a special character (like `"` or ``) in a Python string, use the backslash ``. For example: `my_string = 'Hello"World'`.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What does the __ init__ function do in python?

1 Answers  


Is python interpreted or compiled?

1 Answers  


What is the function of gil in python?

1 Answers  


What is a sequence in python?

1 Answers  


What is super () in react?

1 Answers  


What is the common way for the flask script to work?

1 Answers  


What is module and package in Python?

1 Answers  


Can I learn python without knowing html?

1 Answers  


How can we make forms in python?

1 Answers  


What do you know about iterator protocol?

1 Answers  


What is the language from which Python has got its features or derived its features?

1 Answers  


Explain about exceptions in python?

1 Answers  


Categories