Python supports several built-in data types, including:
Integer (int): Whole numbers without a fractional component.
Floating-point (float): Numbers with a fractional component.
Complex (complex): Numbers with a real and imaginary part.
String (str): A sequence of characters.
List (list): An ordered collection of items.
Tuple (tuple): An ordered, immutable collection of items.
Dictionary (dict): A collection of key-value pairs.
Set (set): An unordered collection of unique elements.
Frozen set (frozenset): An immutable version of a set.
Boolean (bool): Represents either True or False.
Bytes (bytes): A sequence of bytes.
Bytearray (bytearray): A mutable sequence of bytes.
These are the main built-in data types in Python. Additionally, Python also allows you to define and work with custom data types using classes and objects.
Comments
Post a Comment