What is the difference between single quotes and double quotes??? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 1

What is the difference between single quotes and double quotes???

I'm a beginner. Just now started to learn python

29th Oct 2018, 3:42 PM
Shyamganesh
Shyamganesh - avatar
4 Respuestas
+ 1
In Python there is none, you can choose them as you like. This is convenient when you want to use a quote inside a string; then you just take the other set on the outside: print("What's up")
29th Oct 2018, 3:47 PM
HonFu
HonFu - avatar
+ 2
Python is so easy because it does a lot of stuff for you in the background without you even knowing. That's convenient, but it is also one of the factors making it slower than C++. Another factor is that C++ code is translated into machine code once, while Python code is translated line by line over and over every time you run it. In C++ you generally have to write more than in Python, but you can control more directly what happens, for example by accessing memory directly, finding your own quickest way to do stuff; then the compiler will do a few optimizations ... So in cases where you need performance, like in 3D games, C++ does a better job.
29th Oct 2018, 3:58 PM
HonFu
HonFu - avatar
+ 2
thanks a lot for ur information...bro
29th Oct 2018, 5:52 PM
Shyamganesh
Shyamganesh - avatar
+ 1
python is more easier than c++ then why people still using c++?
29th Oct 2018, 3:49 PM
Shyamganesh
Shyamganesh - avatar