Using an apostrophe in print code line | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

Using an apostrophe in print code line

What do I do if the first character in the phrase I want to print is an apostrophe? example: >>>print (''Tis early')

7th Jan 2019, 2:06 PM
Jenevieve Molenda
Jenevieve Molenda - avatar
1 Antwort
+ 1
You can use '\' symbol before any such character. For e.g. : >>> print("Hello \"Jenevieve\" ") >>> print("Hello \'Myself\' ")
7th Jan 2019, 2:17 PM
Googel
Googel - avatar