...

/

String Quotes

String Quotes

This lessons guides you how to deal with string quotes in Python.

In Python, single-quoted strings and double-quoted strings are the same.

Pick a rule and stick to it.

Single Quotes

string = 'Educative'

Double Quotes

string = "Educative"

String within a String

You need to concatenate the strings if there is more than one:

Incorrect: string = "Educative "Inc""
Correct: string = "Educative" + "Inc"