Day 61 of #100DaysOfCode — Python Refresher Part 1
When I started my #100DaysOfCode journey, I began with frontend development using React, then moved into backend development with Node.js and Express. After that, I explored databases to understand how data is stored and managed, followed by building full-stack applications with Next.js. It is now time to start learning Python, not from scratch, but as a refresher to strengthen my fundamentals and expand my backend skillset. Learning Python strengthens my core programming skills and offers a new perspective beyond JavaScript. It aligns with backend development, data handling, and automation, allowing me to build on my existing knowledge and become a more versatile developer. Today, for Day 61, I focused on revisiting the core building blocks of Python. Core Syntax Variables Data Types Vari
When I started my #100DaysOfCode journey, I began with frontend development using React, then moved into backend development with Node.js and Express. After that, I explored databases to understand how data is stored and managed, followed by building full-stack applications with Next.js. It is now time to start learning Python, not from scratch, but as a refresher to strengthen my fundamentals and expand my backend skillset.
Learning Python strengthens my core programming skills and offers a new perspective beyond JavaScript. It aligns with backend development, data handling, and automation, allowing me to build on my existing knowledge and become a more versatile developer.
Today, for Day 61, I focused on revisiting the core building blocks of Python.
Core Syntax
Variables & Data Types
Variables are used to store data, and Python automatically assigns the data type based on the value.
Enter fullscreen mode
Exit fullscreen mode
You don’t need to declare types explicitly like in some other languages; Python handles it dynamically.
Conditionals (if/elif/else)
Conditionals let your program make decisions.
age = 20
if age >= 18: print("Adult") elif age > 12: print("Teen") else: print("Child")`
Enter fullscreen mode
Exit fullscreen mode
This is fundamental for controlling program flow, especially in backend logic (auth checks, validations, etc.).
Loops (for, while)
Loops allow you to repeat actions.
Enter fullscreen mode
Exit fullscreen mode
Enter fullscreen mode
Exit fullscreen mode
for is used more often in Python, especially when working with collections.
Functions
Functions group logic into reusable blocks.
print(add(2, 3))`
Enter fullscreen mode
Exit fullscreen mode
They help keep your code clean and modular.
Data Structures
Lists
Lists store multiple items in order.
Enter fullscreen mode
Exit fullscreen mode
Dictionaries
Dictionaries store data in key-value pairs, similar to objects in JavaScript.
print(user["name"])`
Enter fullscreen mode
Exit fullscreen mode
Must Know:
Looping through dicts
Enter fullscreen mode
Exit fullscreen mode
Nested data handling
print(data["user"]["name"])`
Enter fullscreen mode
Exit fullscreen mode
👉 This directly maps to:
-
JSON (backend APIs)
-
Database data
Sets
Sets store unique values.
Enter fullscreen mode
Exit fullscreen mode
Tuples
Tuples are like lists, but immutable (cannot be changed).
point = (10, 20)
Enter fullscreen mode
Exit fullscreen mode
Loops & Iteration
Looping through collections:
numbers = [1, 2, 3]
for num in numbers: print(num)`
Enter fullscreen mode
Exit fullscreen mode
Using range():
Enter fullscreen mode
Exit fullscreen mode
Nested loops (useful for complex data):
matrix = [[1, 2], [3, 4]]
for row in matrix: for item in row: print(item)`
Enter fullscreen mode
Exit fullscreen mode
Functions
Functions are where your code becomes structured and reusable:
Functions make your code reusable and structured.
print(greet()) print(greet("Ali"))`
Enter fullscreen mode
Exit fullscreen mode
👉 Think:
“How do I structure logic cleanly?”
Good function design = cleaner code + easier debugging + better scalability.
Working with JSON (IMPORTANT FOR BACKEND)
import json
data = json.loads(json_string) json_string = json.dumps(data)`
Enter fullscreen mode
Exit fullscreen mode
JSON is how data is exchanged between frontend and backend.
Example:
import json
json_string = '{"name": "Ali"}' data = json.loads(json_string)
print(data["name"])`
Enter fullscreen mode
Exit fullscreen mode
👉 This is directly used in:
-
APIs
-
Django / Flask
Basic File Handling
Working with files is a fundamental skill in backend:
-
Reading files
-
Writing files
Enter fullscreen mode
Exit fullscreen mode
👉 Useful for:
-
Logs
-
Data processing
-
Simple storage tasks
List Comprehension (VERY USEFUL)
squares = [x*x for x in range(10)]*
Enter fullscreen mode
Exit fullscreen mode
A shorter and cleaner way to write loops.
Equivalent version:
Enter fullscreen mode
Exit fullscreen mode
👉 Cleaner + faster code
Final Thoughts
Today wasn’t about learning something completely new; it was about reinforcing the fundamentals. Python feels simple on the surface, but mastering these basics is what makes you effective when building real-world applications.
Thanks for reading. Feel free to share your thoughts!
Sign in to highlight and annotate this article

Conversation starters
Daily AI Digest
Get the top 5 AI stories delivered to your inbox every morning.
More about
versionapplicationperspective
Measuring AI's Role in Software Development: Evaluating Agency and Productivity in Low-Level Programming Tasks
The Role of AI in Low-Level Software Development: An Expert Analysis As a low-level programmer, I’ve witnessed the growing integration of AI tools like GitHub Copilot into software development workflows. The industry hype often portrays these tools as revolutionary, capable of transforming coding into a near-autonomous process. However, my firsthand experience reveals a more nuanced reality: AI serves as an accelerator and assistant, but its agency in handling complex, low-level tasks remains severely limited. This analysis dissects the mechanisms, constraints, and system instabilities of AI in this domain, contrasting practical contributions with exaggerated claims. Mechanisms of AI Integration in Low-Level Development 1. AI-Assisted Code Completion Impact → Internal Process → Observable

I built an npm middleware that scores your LLM prompts before they hit your agent workflow
The problem with most LLM agent workflows is that nobody is checking the quality of the prompts going in. Garbage in, garbage out but at scale, with agents firing hundreds of prompts per day, the garbage compounds fast. I built x402-pqs to fix this. It's an Express middleware that intercepts prompts before they hit any LLM endpoint, scores them for quality, and adds the score to the request headers. Install npm install x402-pqs Usage const express = require ( " express " ); const { pqsMiddleware } = require ( " x402-pqs " ); const app = express (); app . use ( express . json ()); app . use ( pqsMiddleware ({ threshold : 10 , // warn if prompt scores below 10/40 vertical : " crypto " , // scoring context onLowScore : " warn " , // warn | block | ignore })); app . post ( " /api/chat " , ( re

The Complete Architecture for Trustworthy Autonomous Agents
Four layers. Four questions. Missing any one of them is how production systems fail. Every serious conversation about securing AI agents eventually produces the same result: a list of things you need to do that don’t obviously fit together. Fine-grained authorization. Runtime monitoring. Capability scoping. Behavioral guardrails. Intent tracking. Wire-level enforcement. Each of these sounds right in isolation. None of them, in isolation, is sufficient. The reason production agentic systems fail is rarely that they’re missing everything. It’s that they have one or two layers and are missing the others — often without knowing it. The team that built a careful authorization system discovers their agent can still drift from its declared intent in ways that pass every check. The team that deplo
Knowledge Map
Connected Articles — Knowledge Graph
This article is connected to other articles through shared AI topics and tags.
More in Releases


Hong Kong’s John Lee pledges to expand after-school care for low-income families
Hong Kong leader John Lee Ka-chiu has promised to allow more children from low-income families to enjoy after-school care on campus by further expanding a government scheme following positive feedback from participants. Social workers and educators welcomed the initiative on Saturday, proposing the government widen the scheme’s coverage to include more pupils and encourage more schools to join through subsidies. The scheme, launched as part of a government’s targeted measures to tackle poverty,...

1 dead in Peru football stadium tragedy, dozens injured
At least one person died and 60 others were injured in what seemed to be a crush of fans at a popular football team’s stadium in the Peruvian capital on Friday night, authorities reported. Police said officers rescued people trapped as a result of an influx of Alianza Lima fans in the south stands of the Alejandro Villanueva Stadium the night before their team’s scheduled game against their biggest rival, Universitario. Earlier, the Ministry of Health had reported the collapse of a wall inside...



Discussion
Sign in to join the discussion
No comments yet — be the first to share your thoughts!