December 2000
Intermediate to advanced
816 pages
16h 57m
English
Numbers provide literal or scalar storage and direct access. Numbers are also an immutable type, meaning that changing or updating its value results in a newly allocated object. This activity is, of course, transparent to both the programmer and the user, so it should not change the way the application is developed.
Python has four types of numbers: “plain” integers, long integers, floating point real numbers, and complex numbers.
Creating numbers is as simple as assigning a value to a variable:
anInt = 1 1aLong = -9999999999999999L aFloat = 3.1415926535897932384626433832795 aComplex = 1.23 + 4.56J
You can “update” an existing number by (re)assigning ...
Read now
Unlock full access