One thing has fascinated me since ancient times. In languages ββlike c, we need to declare data types, e.g. integer as int, character as char, etc. I mean we pass the data type information to the C compiler. But in python, let's say I declare
c = 2
The compiler then interprets c as a whole. And if I announce
c = "a"
the compiler interprets c as a character. My doubt is how the compiler knows how to assign the appropriate data type to c without explicitly declaring it. This may be a major question for python experts, but shed light on this
source share