0% found this document useful (0 votes)
5 views9 pages

Python Data Types Explained

The document outlines various Python data types, including number types (int, float, complex), boolean, sequence types (str, list, tuple), and mapping types (dict). It distinguishes between mutable and immutable types, emphasizing the importance of understanding these concepts for efficient data organization and processing. The summary table categorizes the data types and their mutability.

Uploaded by

saswata8844
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views9 pages

Python Data Types Explained

The document outlines various Python data types, including number types (int, float, complex), boolean, sequence types (str, list, tuple), and mapping types (dict). It distinguishes between mutable and immutable types, emphasizing the importance of understanding these concepts for efficient data organization and processing. The summary table categorizes the data types and their mutability.

Uploaded by

saswata8844
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

PYTHON DATA

TYPES
NUMBER DATA TYPES

• Integer (int): Whole numbers → a = 25


• Float (float): Decimal numbers → x = 3.14
• Complex (complex): Real + Imaginary → z = 2 + 3j
• Immutable
BOOLEAN DATA TYPE

• Boolean (bool) represents truth values


• Values: True, False
SEQUENCE DATA TYPES

• String (str): Characters, Immutable → 'Hello'


• List (list): Ordered, Mutable → [10, 20, 'apple']
• Tuple (tuple): Ordered, Immutable → (1, 2, 3)
NONE DATA TYPE

• None represents absence of value


• Example: result = None
MAPPING DATA TYPE

• Dictionary (dict): Key–Value pairs, Mutable


• Example: student = {'name': 'Amit', 'age': 16, 'class': '10th'}
MUTABLE VS
IMMUTABLE

• Mutable (can change): list, dict, set


• Immutable (cannot change): int, float, complex, str, tuple, bool,
None
SUMMARY TABLE

• Number → int, float, complex


• Boolean → bool
• Sequence → str, list, tuple
• None → NoneType
• Mapping → dict
• Mutable → list, dict, set
• Immutable → int, float, complex, str, tuple, bool, None
CONCLUSION

• Python supports multiple data types


• Helps in organizing and processing data efficiently
• Knowing mutable vs immutable is important

You might also like