Python Data Types
Table of Contents
Python Data Types
Examples
Numbers
# Integer age = 30 # Float price = 19.99
Strings
name = "Gregory" message = 'Hello, World!'
Lists
# Ordered, mutable collection fruits = ["apple", "banana", "cherry"]
Tuples
# Ordered, immutable collection coordinates = (10.0, 20.0)
Dictionaries
# Unordered, mutable collection of key-value pairs person = {"name": "Gregory", "age": 30}
Booleans
is_active = True has_permission = False