+ 2

How to escape double quotes in Python

I want to print “I am learning python” with the quotes

12th Nov 2019, 1:12 PM
Prodigy
Prodigy - avatar
4 ответов
+ 6
use \” like this: print(“\”I am learning python\””) OR, use ‘ print(‘ “I am learning python” ‘) without the spaces of course
12th Nov 2019, 1:18 PM
꧁༺ Jenspi ༻꧂
꧁༺ Jenspi ༻꧂ - avatar
+ 2
You can use print('"I am learning Python"') 1) ' 2) " 3) " 4) '
12th Nov 2019, 10:08 PM
Jannik Müller
Jannik Müller - avatar
+ 1
print("\"I am learning python\"")
12th Nov 2019, 1:41 PM
Tarek Hammami
Tarek Hammami - avatar
0
\
2nd Oct 2022, 6:02 AM
Sumit Prajapati
Sumit Prajapati - avatar