© 2004-21

Python Datatypes

When you use a variable it is implicitly declared to the interpreter and you do not have to say there what type of data it will contain.

The most common Python data types are:


A sequence of one or more characters comprising anything that can be typed in from the keyboard
(including some special control characters such as newline)


The Integer data type store whole numbers as a 32bit value

floating point

A numeric value that includes positive and negative values as well as decimal fractions


A data type with only two possible values, True (-1) or False (0).

Complex datatypes


Contains multiple values in an ordered sequence


similar to a list but you can reference elements by a name - similar to a database field


Read only version of a list (ie cannot be modified at run time)