Please what is the string to print double quod | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please what is the string to print double quod

I don know

6th Nov 2019, 2:59 AM
Vlädïmïr Sërgüëïl
Vlädïmïr Sërgüëïl - avatar
3 Answers
+ 3
You can also use single quotes to print doubles (and doubles to print singles) print('Say "hi" there') print("Say 'hi' there") you can even use triples print("""Say "hi" and 'bye' there""")
6th Nov 2019, 5:59 AM
David Ashton
David Ashton - avatar
+ 2
Please tag 'Python' rather than 'please help me'. Tags are important for search feature, they are used for finding matches by tag similarities. So please use relevant words only, because the presence of irrelevant words breaks the search functionality. To answer your question, you prepend a \ before the double quote character. print("He said \"Bye\" before going back.") For future reference, follow this guide for posting a question 👍 https://www.sololearn.com/Discuss/333866/?ref=app
6th Nov 2019, 3:34 AM
Ipang
+ 2
David Ashton I didn't know triple quoted string are also printable. Always thought they were merely used to build multi line comments 😁
6th Nov 2019, 6:40 AM
Ipang