🚀 Python Basics: My Journey From Scratch


When I first started learning Python, I didn’t know where to begin. But instead of jumping into frameworks or AI right away, I decided to master the basics properly — and that decision changed everything.
Here’s a quick snapshot of what I’ve learned so far, explained in my own words — raw, beginner-level, and real.
🖨️ 1. The First Step: Print Statement
Let’s be honest — nothing feels more satisfying than printing Hello World
for the first time!
print("Hello World")
print(7)
print(7.7)
print(True)
print("Hello", 1, 4.5, True)
You can print anything — strings, numbers, booleans, and even multiple values at once.
🔠 2. Data Types
Python automatically figures out the type of data you're dealing with:
x = 5 # int
pi = 3.14 # float
flag = True # bool
name = "Alice" # str
z = 3 + 4j # complex
l = [1, 2, 3] # list
s = {1, 2, 3} # set
t = (1, 2, 3) # tuple
d = {"name": "Alice", "age": 25} # dict
Each one of these types serves its own purpose. For example, list
is mutable, but tuple
is not. I found these differences fascinating as I explored further.
🧮 3. Variables & Typing
Python is dynamically typed — no need to mention data type while declaring.
Also, stylish declaration was the most fascinating while pythonic thing i found.
a = 5
name = "Bibi Zainab"
x, y, z = 1, 2, 3 # multiple assignment
a = b = c = 0 # same value for all
And I also came across the difference between:
Static Typing: (C++, Java)
Dynamic Typing: (Python — type decided at runtime)
🚫 4. Keywords & Identifiers
Python has some reserved words like
if
,else
,while
, etc. Don’t use them as variable names.Identifiers (variable names) should:
Start with a letter or underscore
Not contain special characters or spaces
Not start with a number
🧑💻 5. Taking User Input
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
result = a + b
print("Sum is:", result)
Just wrap input()
inside int()
or float()
to typecast as needed.
🔁 6. Type Conversion
Python handles some conversions on its own:
Implicit Conversion
int + float → float
Explicit Conversion
int("5") # '5' (str) → 5 (int) float("2.7") # '2.7' → 2.7
🔢 7. Literals
Different ways to represent numbers:
a = 0b0101 # binary
b = 0o310 # octal
c = 100 # decimal
d = 0x12c # hexadecimal
🟣 8. The None
Keyword
Sometimes, I don’t want to assign any value yet — that’s where None
comes in.
x = None
It’s like saying, “This exists, but hasn’t been set yet.”
👀 What's Next?
In Part 2, I’ll walk through:
How I built menu-driven programs
Practiced using if-else
Wrote my first mini-calculators and ATM-like interfaces
Believe me — that part gets exciting real fast! 🔥
If you’re also learning Python or just started, feel free to share your journey or questions in the comments. I’d love to connect and grow together.
Let’s keep coding. 💻
#python #beginners #learning #devjourney #codewithme
Subscribe to my newsletter
Read articles from Bibi Zainab directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
