banner

© 2004-19 ict4u.net

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:

boolean

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

dictionary

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

integer

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

string

A sequence of one or more characters

list

Contains multiple values in an ordered sequence

Tuple

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