0

How can this statement give the output - print("print") , when it is using single quotes. It should be an error.

>>>print('print("print")') It should be an error as single quotes are used for a single character.

11th Jun 2017, 4:18 PM
Canterville Ghost
Canterville Ghost - avatar
4 Respostas
11th Jun 2017, 4:24 PM
Hatsy Rei
Hatsy Rei - avatar
+ 10
@Canterville I suppose so. I'm not an expert at Python myself, so it would be better to wait and see if anyone has conflicting opinions.
11th Jun 2017, 4:55 PM
Hatsy Rei
Hatsy Rei - avatar
0
Hatsy , so we can use single quotes at most of the places instead of double quotes in python ?
11th Jun 2017, 4:28 PM
Canterville Ghost
Canterville Ghost - avatar