Perfect channel to learn Python Programming ๐ฎ๐ณ
Download Free Books & Courses to master Python Programming
- โ
Free Courses
- โ
Projects
- โ
Pdfs
- โ
Bootcamps
- โ
Notes
Admin: @Coderfun
Post #2584
3.16K
โ
Python Basics: Part-1
Data Types & Variables ๐๐
๐ฏ What is a Variable?
A variable stores data in memory to be used and modified later.
Example:
name = "Alice"
age = 25
๐น Common Python Data Types:
โ String (str) โ Text data
message = "Hello, World"
โ Integer (int) โ Whole numbers
count = 42
โ Float (float) โ Decimal numbers
price = 19.99
โ Boolean (bool) โ True or False
is_valid = True
โ List (list) โ Ordered, mutable sequence
fruits = ["apple", "banana", "cherry"]
โ Tuple (tuple) โ Ordered, immutable sequence
coords = (10.5, 20.7)
โ Set (set) โ Unordered collection of unique elements
colors = {"red", "green", "blue"}
โ Dictionary (dict) โ Key-value pairs
person = {"name": "Alice", "age": 25}
๐ Dynamic Typing:
Python automatically detects the type, so you donโt need to declare it.
๐ฌ Double Tap โค๏ธ for Part-2!
Data Types & Variables ๐๐
๐ฏ What is a Variable?
A variable stores data in memory to be used and modified later.
Example:
name = "Alice"
age = 25
๐น Common Python Data Types:
โ String (str) โ Text data
message = "Hello, World"
โ Integer (int) โ Whole numbers
count = 42
โ Float (float) โ Decimal numbers
price = 19.99
โ Boolean (bool) โ True or False
is_valid = True
โ List (list) โ Ordered, mutable sequence
fruits = ["apple", "banana", "cherry"]
โ Tuple (tuple) โ Ordered, immutable sequence
coords = (10.5, 20.7)
โ Set (set) โ Unordered collection of unique elements
colors = {"red", "green", "blue"}
โ Dictionary (dict) โ Key-value pairs
person = {"name": "Alice", "age": 25}
๐ Dynamic Typing:
Python automatically detects the type, so you donโt need to declare it.
๐ฌ Double Tap โค๏ธ for Part-2!
- โค 59
- ๐ 1













