How does python understands an assigned variable while in c++ it needs to be specified like (int,string,char) ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How does python understands an assigned variable while in c++ it needs to be specified like (int,string,char) ?

24th Dec 2021, 12:38 PM
King
King - avatar
3 Answers
+ 1
Martin Taylor so in c++ some bytes of memory is saved.while python just reserves few memory for variables?
24th Dec 2021, 1:11 PM
King
King - avatar
+ 1
Python is not type save and not null save. And even many people say that's a feature, I would say it's a bug 😉
24th Dec 2021, 3:55 PM
Coding Cat
Coding Cat - avatar
0
When a type is "generic" being capable of store different types, its known as a VARIANT
24th Dec 2021, 11:58 PM
Kiwwi#
Kiwwi# - avatar