Categories
Python Answers

How to use quotation marks inside quotation marks with Python?

Spread the love

Sometimes, we want to use quotation marks inside quotation marks with Python.

In this article, we’ll look at how to use quotation marks inside quotation marks with Python.

How to use quotation marks inside quotation marks with Python?

To use quotation marks inside quotation marks with Python, we can use the single and double quotes together.

For instance, we write

print('"A word that needs quotation marks"')

to wrap our double quoted string with single quotes.

Conclusion

To use quotation marks inside quotation marks with Python, we can use the single and double quotes together.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *