+ 7
What is the difference when we use " " and ' ' in python
7 Respuestas
+ 4
They are the same, the only difference between them may be which you prefer.
+ 4
they are the same, but if you are going to use one in the string, use the other one around it
+ 1
"Ali's" is ok but 'Ali's' is Error
+ 1
In python, they are interchangeable. In other languages they may not be, such as java or C.
+ 1
" " means a string ie a sentence....while ' ' means a character ie a letter
0
if Use to ' you can t ' in Text so print 'ali\'s ' Use
0
@Evcheto Novakova. they would function the same way used separately. the difference comes when you can use both of them on one line.
say: name="I'm Evcheto Novakova"
using them together this way and many more makes it easier to write codes.
but using it this way: 'I'm Evcheto Novakova'
would result in a string error. otherwise, either one of them works fine.