thewhitetulip / build-app-with-python-antitextbook

Aims to teach Python3 by example
GNU General Public License v3.0
559 stars 69 forks source link

Explain difference between Types, example: 1 versus 1.0 #21

Closed HenrikBengtsson closed 7 years ago

HenrikBengtsson commented 7 years ago

In https://github.com/thewhitetulip/build-app-with-python-antitextbook/blob/master/manuscript/03-01-understanding-variables.md, it could be helpful to also show the difference between 1 and 1.0, e.g.

>>> type(1)
<type 'int'>
>>> type(1.)
<type 'float'>
>>> type(1.0)
<type 'float'>