Python Data Types

Numbers (int, float, complex)
x = 10        # int
y = 3.14      # float
z = 1 + 2    # complex
Strings (str)
text = "Hello, World!"
print(text.lower())
print(text[0:5])
Lists
fruits = ["apple", "banana", "cherry"]
fruits.append("orange")
print(fruits[1])
Tuples
coordinates = (10, 20)
print(coordinates[0])
Dictionaries
person = {"name": "Alice", "age": 25}
print(person["name"])
Sets
unique_numbers = {1, 2, 3, 3}
print(unique_numbers)  # {1, 2, 3}
Boolean
is_active = True
print(is_active)
NoneType
x = None
print(x)