How to escape double quotes in Python | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Respostas
+ 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