Skip to main content

Posts

Showing posts from June 28, 2026

Python Fundamental (int,float,str,bool) Data types Explained with Examples

What are Data Types? Data types define the type of value that can be stored in a variable. Every value in Python belongs to a specific data type, and each data type behaves differently. Examples of Python Data Types: int → Integer (Whole numbers) float → Decimal numbers bool → True or False str → Text/String list → Ordered collection (Mutable means Changing the Values) tuple → Ordered collection (Immutable means doestn't Changed the Values) dict → Key-value pairs (Mutable) set → Unique unordered values (Mutable) Example: Student Information (All Data Types) Python 📋 Copy name="Hamid Hasnain" # ----> is Called String age=19 # ----> is Called intgers(int) percentage=51.55 # ----> is Called Float you_pass=True # ----> is Called Boolean(bool) # list[] subject_name=["Physics","Chemistry","Biology","Matha...