V
last year
Valcountry asked

What is the technical difference between single quotes and double quotes in Python strings?

Abhay Jajodia
Expert
last year
Abhay Jajodia answered

Hi Val Galoy,

In Python, there is no real technical difference. Both ' ' and " " create the same type of string.

People choose one over the other to make writing easier when the text already contains quotes.

Example:

print('She said, "Hello!"')
print("It's a sunny day!")

If you have more questions, I am here to help 😊

Python
This question was asked as part of the Getting started with Python course.