Desk2Mob

Desk2Mob

Desk2Mob

Single quotes and double quotes in Python

In Python, single quotes and double quotes create the same kind of string. These two lines are equivalent:

foo = "bar"
foo = 'bar'

If Jupyter or the Python console shows the value as 'bar', that does not mean Python changed your double quotes into single quotes. The console is showing ...

Posted on June 08, 2026 by Amit Pandya in python