TGViewer
Python Learning Python Learning @python_bds · 5.75K subscribers
Post #893 1.43K
Python Basics

🔹 Variables = Store data for use in a program
x = 1

print(x) # Output: 1
🔹 Data Types = Classification of data (Boolean, String, Number)
number = 10

if number > 0:

print("The number is true") # Output: true



🔹 Operators = Symbols for performing operations (+, -, *, /, %, etc.)
print(1 + 2) # Output: 3

print(2 - 1) # Output: 1
🔹 Control Statements = Manage program execution flow

✔ Conditional Statements → "if-then" logic
score = 85

if score >= 90:

print("Excellent")

elif score >= 75:

print("Good job")

else:

print("Keep trying")
✔ Loop Statements → Repeat actions (for, while loops)
count = 1

while count <= 5:

print(count)

count += 1

🔹 Functions = Reusable blocks of code
def my_function():

print("Hello from a function")

my_function() # Output: Hello from a function
  • 👍 3
More from @python_bds
  1. Oct 11, 2026📘 The Big Book of Small Python Projects ✍️ Author: Al Sweigart 🔗 Read Online #Python #Pr…
  2. Oct 10, 2026document post
  3. Oct 10, 2026This Book Explains more than 400 Concepts with codes.
  4. Oct 8, 2026🐛 This Python Bug Looks Random, But It Isn't Look at this: functions = [] for i in range(…
  5. Oct 6, 2026🐍 Python Performance Optimization Python Performance Optimization: Make Your Code Faster…
  6. Oct 4, 2026Python Set Methods ✍️
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →