When I type small integers with a 0 in front into python, they give weird results. Why is this?
>>> 011
9
>>> 0100
64
>>> 027
23
<
In Python 2 (and a few more programming languages), these represent octal numbers.
In Python 3, 011 no longer works and you would use 0o11 instead.
In response to edit: and they are regular integers. They are just specified different way; and they are automatically converted by Python to an internal integer representation (which is base-2 actually, so both 9 and 011 are internally converted to 0b1001).