0

when do we get a single quoted output and when do we get output with no quote??

7th Apr 2020, 6:12 AM
Shubham Kulkarni
2 Respostas
+ 2
>>> string = "hello\nworld" >>> print(string) hello world >>> print(repr(string)) 'hello\nworld'
7th Apr 2020, 6:59 AM
visph
visph - avatar
+ 1
print("Hello world") #Output: Hello world print("\"Hello world\"") #Output:"Hello world" For printing quotes we use escape sequence.. otherwise string will only be printed some other ways to print quotes: print(" ' Hello world' ") #Output : ' Hello world ' using double quotes outside and single quotes inside and vice versa I HOPE IT HELPS!!!🙂
7th Apr 2020, 6:32 AM
ANJALI SAHU