LEARN COMPLETE PYTHON IN 24 HOURS
🟦 Python Basics
🔹 1. Introduction to Python
1.1 What is Python and Why Learn It in 2025?
1.2 Who Uses Python Today?
1.3 Python vs Other Languages
1.4 How to Install Python
1.5 Setting Up VS Code
🔹 2. Basic Building Blocks
🔹 3. Operators in Python
🔹 4. Taking Input & Output
🔹 5. Control Flow (if-else)
🔹 6. Loops in Python
🔹 7. Lists
🔹 8. Tuples
🔹 9. Strings (Deep Dive)
🔹 10. Dictionaries
🔹 11. Sets
🔹 12. Functions
🔹 13. Modules & Packages
🔹 14. Mini Projects
3. Operators in Python
Operators are special symbols that perform operations on values (called operands). Python has many built-in operators that make calculations, comparisons, and logic super easy.
Let’s learn all types one by one with real examples.
3.1 Arithmetic Operators (+, -, , /, //, %, *)
These are used for mathematical calculations.
OperatorNameExampleResultDescription+Addition10 + 515Adds two numbers-Subtraction10 - 55Subtracts*Multiplication10 550Multiplies/Division10 / 33.333...Always returns float//Floor Division10 // 33Returns integer (removes decimal)%Modulo (Remainder)10 % 31Returns remainder*Exponent (Power)2 ** 382 to the power of 3
Practical Examples:
Python
a = 15 b = 4 print(a + b) # 19 print(a - b) # 11 print(a b) # 60 print(a / b) # 3.75 print(a // b) # 3 print(a % b) # 3 print(a * b) # 50625
Real-life Tip: Use % to check even/odd:
Python
num = 25 print("Even" if num % 2 == 0 else "Odd") # Odd
3.2 Comparison Operators (==, !=, >, <, >=, <=)
These compare two values and return True or False.
OperatorNameExampleResult==Equal to5 == 5True!=Not equal to5 != 3True>Greater than10 > 5True<Less than10 < 5False>=Greater than or equal10 >= 10True<=Less than or equal5 <= 10True
Examples:
Python
age = 20 print(age == 18) # False print(age != 18) # True print(age > 18) # True print(age >= 20) # True print(age < 18) # False
Tip: These are used in if conditions (we will learn in Control Flow).
3.3 Logical Operators (and, or, not)
These combine multiple conditions.
OperatorDescriptionExampleandTrue only if both conditions are True(5>3 and 10>8) → TrueorTrue if at least one is True(5>10 or 10>8) → TruenotReverses the result (True becomes False)not (5>10) → True
Examples:
Python
age = 25 has_license = True print(age > 18 and has_license) # True → can drive print(age > 18 or has_license) # True print(not has_license) # False
Real-life Example:
Python
is_raining = True have_umbrella = False print("Go outside?" if not is_raining or have_umbrella else "Stay home") # Output: Stay home
3.4 Assignment Operators (=, +=, -=, *=, etc.)
Used to assign and update values in one step.
OperatorExampleSame as=x = 10x = 10+=x += 5x = x + 5-=x -= 3x = x - 3*=x = 2x = x 2/=x /= 4x = x / 4//=x //= 2x = x // 2%=x %= 3x = x % 3**=x = 2x = x 2
Live Example:
Python
score = 100 score += 50 # score = 150 score -= 20 # score = 130 score *= 2 # score = 260 score /= 2 # score = 130.0 print("Final score:", score)
3.5 Membership Operators (in, not in)
Check if a value exists in a sequence (string, list, tuple, etc.).
Python
fruits = ["apple", "banana", "mango"] name = "Anshuman" print("apple" in fruits) # True print("grape" in fruits) # False print("grape" not in fruits) # True print("a" in name) # True print("z" not in name) # True
3.6 Identity Operators (is, is not)
Check if two variables point to the same object in memory (not just equal value).
Python
x = 1000 y = 1000 a = [1, 2, 3] b = [1, 2, 3] print(x == y) # True (same value) print(x is y) # False (different objects) print(a == b) # True print(a is b) # False print(x is not y) # True
Important Note: Use == for value comparison and is only for identity (mostly with None, True, False).
Example with None:
Python
result = None print(result is None) # True (correct way)
This completes the full Operators in Python section — super important for all future topics!
📚 Amazon Book Library
All my books are FREE on Amazon Kindle Unlimited🌍 Exclusive Country-Wise Amazon Book Library – Only Here!
On GlobalCodeMaster.com you’ll find complete, ready-to-use lists of my books with direct Amazon links for every country.
Belong to India, Australia, USA, UK, Canada or any other country? Just click your country’s link and enjoy:
✅ Any eBook FREE on Kindle Unlimited ✅ Or buy at incredibly low prices
400+ fresh books written in 2025-2026 with today’s latest AI, Python, Machine Learning & tech trends – nowhere else will you find this complete country-wise collection on one platform!
Choose your country below and start reading instantly 🚀
BOOK LIBRARY USA 2026 LINK
BOOK LIBRARY INDIA 2026 LINK
BOOK LIBRARY AUSTRALIA 2026 LINK
BOOK LIBRARY CANADA 2026 LINK
BOOK LIBRARY UNITED KINGDOM 2026 LINK
BOOK LIBRARY GERMANY 2026 LINK
BOOK LIBRARY FRANCE 2026 LINK
BOOK LIBRARY ITALY 2026 LINK
BOOK LIBRARY SPAIN 2026 LINK
BOOK LIBRARY NETHERLANDS 2026 LINK
BOOK LIBRARY BRAZIL 2026 LINK
BOOK LIBRARY MEXICO 2026 LINK
BOOK LIBRARY JAPAN 2026 LINK
BOOK LIBRARY POLAND 2026 LINK
BOOK LIBRARY IRELAND 2026 LINK
BOOK LIBRARY SWEDEN 2026 LINK
BOOK LIBRARY BELGIUM 2026 LINK
Email-ibm.anshuman@gmail.com
© 2026 CodeForge AI | Privacy Policy |Terms of Service | Contact | Disclaimer | 1000 university college list|book library australia 2026|Latest AI Trends (Global & India 2026) 400 GLOBAL BOOK STORE WORLDWID|TOP 400 FREE BOOK LIBRARY USA|TOP 400 FREE BOOK LIBRARY INDIA|Audiobooks at Just ₹99 | $1.25| E-Books at Just ₹49 | $0.50| 50+ AI Expert Tutorials
All my books are exclusively available on Amazon. The free notes/materials on globalcodemaster.com do NOT match even 1% with any of my PUBLISHED BOoks. Similar topics ≠ same content. Books have full details, exercises, chapters & structure — website notes do not.No book content is shared here. We fully comply with Amazon policies.
🚀 Best content for SSC, CGL, LDC, TET, NET & SET preparation!
📚 Maths | Reasoning | GK | Previous Year Questions | Tips & Tricks
👉 Join our WhatsApp Channel now:
🔗 https://whatsapp.com/channel/0029Vb6kg2vFnSz4zknEOG1D...