Use of double quotes and single quote in python?



Use of double quotes and single quote in python?..

Answer / Manoj Kumar Sharma

In Python, both double quotes (") and single quotes ('') can be used to define strings. However, when a string contains an embedded quote of the same type as the opening quote, you must escape it using a backslash (). If using a different quote type, there's no need for escaping.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What is a raw input?

1 Answers  


What is python main function and write one good example?

1 Answers  


Which python memory profiler is recommended?

1 Answers  


What is python method?

1 Answers  


What is python written in?

1 Answers  


Is empty python dataframe?

1 Answers  


How do you reverse the string in python?

1 Answers  


Explain help() and dir() functions in python?

1 Answers  


how do you reverse a list in python?

1 Answers  


What does the *args do in python?

1 Answers  


What is python, what are the benefits of using it, and what do you understand of pep 8?

1 Answers  


How to merge two dictionaries in a single expression?

1 Answers  


Categories