0

For printing "hello world!" with quotation, how to write the print statement?

26th Jul 2018, 7:03 AM
aravind12345678
2 ответов
+ 7
a) What hinanawi said, b) You can use both single and double quotes for strings in python and within the string, you can use the other type without having to escape them. So both of these work too: print(' "Hello World!" ') # double quotes within single quotes print(" 'Hello World!' " ) # single quotes within double quotes
26th Jul 2018, 7:51 AM
Anna
Anna - avatar
+ 3
with quotations: print("\"hello world\"")
26th Jul 2018, 7:09 AM
hinanawi
hinanawi - avatar