Scalar data types: integers, floats, None and bool

Python comes with a number of built-in datatypes. These include primitive scalar types like integers as well as collection types like dictionaries. These built-in types are powerful enough to be used alone for many programming needs, and they can be used as building blocks for creating more complex data types.

The basic built-in scalar types we'll look at are:

  • int — signed, unlimited precision integers
  • float — IEEE 754 floating-point numbers
  • None — a special, singular null value
  • booltrue/false boolean values

For now we'll just be looking at their basic details, showing their literal forms and how to create them.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset