How does Python differentiate between the different data types?

Posted by wrongusername on Stack Overflow See other posts from Stack Overflow or by wrongusername
Published on 2010-03-15T05:04:45Z Indexed on 2010/03/15 5:09 UTC
Read the original article Hit count: 246

Filed under:

Sorry if this is quite noobish to you, but I'm just starting out to learn Python after learning C++ & Java, and I am wondering how in the world I could just declare variables like id = 0 and name = 'John' without any int's or string's in front! I figured out that perhaps it's because there are no ''s in a number, but how would Python figure that out in something like def increase(first, second) instead of something like int increase(int first, int second) in C++?!

© Stack Overflow or respective owner

Related posts about python