+ 2
What would be the code for If I want the output '"print'"?
I tried this print (' '"print"' ')
8 Answers
+ 3
Check this out.
https://code.sololearn.com/cNs0q66noLwf/?ref=app
+ 2
Do a backslash before the â like this:
print(â\âprint\ââ)
+ 2
I want "'print"' this output. There are two single quotes and two double quotes
+ 2
Just put a backslash before every quote you wish to appear in the print.
+ 2
this works.
Thank you Jax
+ 2
@Jax is correct. If you're using single quotes to encapsulate a string, you need to use the escape character '\' for every single quote that is part of the string.
0
Who downvoted me? It works. Try it out yourself if you donât believe me.
0
You are very welcome. đ