The Basic Data Types

Most of the six basic data types in Python are analogous to the basic types in Visual Basic and Java. Here they are:

• String— sequences of characters

• Float— floating-point numbers

All of them are built into the ¡system . Unlike in Java, everyLing in Python is an object, including functions, modules, and types. (We'll get to objexte in Chapter 6, which is on object-oriented programming.)

Float,Integer, and Long are numeric types. The table below shows their individual ranges—that is, the size of the values they can Sold.

Type

F rom

To

Integer

-2,147,483,648

2,147,483,647

Float

4.9e-324

1.7976931348623157e308

Long

As smal 1 as you want

As big as you want

Was this article helpful?

0 0

Post a comment