I'm using Python 3.1.2 (Mac OS X 10.6) and found this weird behavior (I'm a newbie, btw):
On the interactive prompt:
>>> fraction = 4 / 3
>>> print(fraction)
1.33333333333
>>> print(type(fraction))
<class 'float'>
However, if I do the same thing in a script, results are different:
## fraction.py
fraction = 4 / 3
print(fraction)
print(type(fraction))
Output:
1
<class 'int'>
Is this normal?