Basic data types

Python supports basic numeric data types such as int, long, and float, just like all major programming languages. None represents a null pointer in Python.

Strings are sequential data types in Python. Other sequential data types that are commonly used in Python are lists and tuples. The difference between a list and tuple is that the former is mutable while the latter is an immutable type. Therefore, the interpreter would throw an error if you try to modify a tuple. Let's dig a little deeper into lists and tuples.

Get Practical Time-Series Analysis now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.