How to get output with double quotes like "Hi Julie", output should contain double quotes as well. Any guesses?? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 3

How to get output with double quotes like "Hi Julie", output should contain double quotes as well. Any guesses??

Question in mind

21st Feb 2018, 12:03 AM
Sunil Kumar
Sunil Kumar - avatar
5 Respostas
+ 6
This will print a backslash as well. print("\\") # in python
21st Feb 2018, 1:21 AM
777
777 - avatar
+ 3
Put a backslash before every quote you wish to be in your output.
21st Feb 2018, 12:06 AM
Jax
Jax - avatar
+ 3
print(ā€œā€helloā€ā€) will not work so try: print(ā€œ\ā€hello\ā€ā€)
21st Feb 2018, 12:07 AM
Jax
Jax - avatar
+ 2
Thank you Jax, what if I wish to print backslash as well
21st Feb 2018, 12:09 AM
Sunil Kumar
Sunil Kumar - avatar
+ 2
Hmmmm. . . . Can you tell me what youā€™re doing? I might be able to help better that way, but unless the backslash is before a parentheses it should print it.
21st Feb 2018, 12:11 AM
Jax
Jax - avatar