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.
name = "Ali" # string age = 22 # integer price = 99.99 # float is_active = True # booleanname = "Ali" # string age = 22 # integer price = 99.99 # float is_active = True # booleanEnter 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.
for i in range(3): print(i)for i in range(3): print(i)Enter fullscreen mode
Exit fullscreen mode
count = 0 while count < 3: print(count) count += 1count = 0 while count < 3: print(count) count += 1Enter fullscreen mode
Exit fullscreen mode
for is used more often in Python, especially when working with collections.
Functions
Functions group logic into reusable blocks.
def add(a, b): return a + bdef add(a, b): return a + bprint(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.
numbers = [1, 2, 3, 4] print(numbers[0]) # 1numbers = [1, 2, 3, 4] print(numbers[0]) # 1Enter fullscreen mode
Exit fullscreen mode
Dictionaries
Dictionaries store data in key-value pairs, similar to objects in JavaScript.
user = { "name": "Ali", "age": 22 }user = { "name": "Ali", "age": 22 }print(user["name"])`
Enter fullscreen mode
Exit fullscreen mode
Must Know:
Looping through dicts
for key, value in user.items(): print(key, value)for key, value in user.items(): print(key, value)Enter fullscreen mode
Exit fullscreen mode
Nested data handling
data = { "user": { "name": "Ali" } }data = { "user": { "name": "Ali" } }print(data["user"]["name"])`
Enter fullscreen mode
Exit fullscreen mode
👉 This directly maps to:
-
JSON (backend APIs)
-
Database data
Sets
Sets store unique values.
nums = {1, 2, 2, 3} print(nums) # {1, 2, 3}nums = {1, 2, 2, 3} print(nums) # {1, 2, 3}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():
for i in range(5): print(i)for i in range(5): print(i)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.
def greet(name="User"): return f"Hello, {name}"def greet(name="User"): return f"Hello, {name}"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
with open("file.txt", "r") as f: data = f.read()with open("file.txt", "r") as f: data = f.read()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:
squares = [] for x in range(10): squares.append(x*x)squares = [] for x in range(10): squares.append(x*x)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
A Network Formation Game for Katz Centrality Maximization: A Resource Allocation Perspective
arXiv:2604.03056v1 Announce Type: cross Abstract: In this paper, we study a network formation game in which agents seek to maximize their influence by allocating constrained resources to choose connections with other agents. In particular, we use Katz centrality to model agents' influence in the network. Allocations are restricted to neighbors in a given unweighted network encoding topological constraints. The allocations by an agent correspond to the weights of its outgoing edges. Such allocation by all agents thereby induces a network. This models a strategic-form game in which agents' utilities are given by their Katz centralities. We characterize the Nash equilibrium networks of this game and analyze their properties. We propose a sequential best-response dynamics (BRD) to model the ne

Multi-agent Reinforcement Learning-based Joint Design of Low-Carbon P2P Market and Bidding Strategy in Microgrids
arXiv:2604.02728v1 Announce Type: new Abstract: The challenges of the uncertainties in renewable energy generation and the instability of the real-time market limit the effective utilization of clean energy in microgrid communities. Existing peer-to-peer (P2P) and microgrid coordination approaches typically rely on certain centralized optimization or restrictive coordination rules which are difficult to be implemented in real-life applications. To address the challenge, we propose an intraday P2P trading framework that allows self-interested microgrids to pursue their economic benefits, while allowing the market operator to maximize the social welfare, namely the low carbon emission objective, of the entire community. Specifically, the decision-making processes of the microgrids are formul

How to Sync Design Tokens Between React and Flutter (Without Losing Your Mind)
Style Dictionary's Flutter support has been broken for years. I built tokensync — a CLI that generates CSS and Flutter ThemeData from one tokens.json file, then verifies they match numerically. Your designer just updated the brand color. You open your CSS file. Update --color-brand-500 . Then you open your Flutter file. Update AppTheme._lightColors.primary . Then you grep for anywhere else it might appear. Then you do the same for dark mode. Then you hope you got them all. Three weeks later a designer screenshots both apps side by side. The web button is #5C6BC0 . The mobile button is #5B6BC0 . Off by one digit. Nobody noticed. It shipped. If you maintain both a React web app and a Flutter mobile app, this is a design token sync problem — and it costs teams 6–20 hours every time tokens cha
Knowledge Map
Connected Articles — Knowledge Graph
This article is connected to other articles through shared AI topics and tags.
More in Releases

Agentic AI-Empowered Wireless Agent Networks With Semantic-Aware Collaboration via ILAC
arXiv:2604.02381v1 Announce Type: cross Abstract: The rapid development of agentic artificial intelligence (AI) is driving future wireless networks to evolve from passive data pipes into intelligent collaborative ecosystems under the emerging paradigm of integrated learning and communication (ILAC). However, realizing efficient agentic collaboration faces challenges not only in handling semantic redundancy but also in the lack of an integrated mechanism for communication, computation, and control. To address this, we propose a wireless agent network (WAN) framework that orchestrates a progressive knowledge aggregation mechanism. Specifically, we formulate the aggregation process as a joint energy minimization problem where the agents perform semantic compression to eliminate redundancy, op

The Axios Attack Proved npm audit Is Broken. Here's What Would Have Caught It
Five days ago, North Korean state hackers hijacked one of the most trusted packages in the JavaScript ecosystem, axios , with 100 million weekly downloads, and turned it into a Remote Access Trojan delivery system. The attack was live on npm for three hours. npm audit flagged nothing. If you ran npm install during that window, your machine may have been silently backdoored. Here's exactly how the attack worked, why traditional tools missed it, and how behavioral analysis would have caught it before a single byte of malicious code executed. The attack, minute by minute The timeline shows a methodical, multi-stage operation: Time (UTC) Event Mar 30, 05:57 [email protected] published, a clean decoy to establish publishing history Mar 30, 23:59 [email protected] published, now with a m

Day One of the Content Pipeline: What Broke and What I Fixed
Ahnii! Yesterday's post walked through automating a content pipeline with GitHub Actions and Issues . The idea: a daily scheduled job scans recent commits and closed issues across several repos, filters out the noise, and opens what's left as GitHub issues labeled stage:mined . One of those issues looks something like this: Title: [content] feat: add SovereigntyProfile to Layer 0 Body: ## Source Commit `abc1234` in `waaseyaa/framework` ## Content Seed feat: add SovereigntyProfile to Layer 0 ## Suggested Type text-post Those issues are raw material. You curate them into drafts, produce the copy, and publish. That surfacing step is what the rest of this post calls mining . This post is about what happened the first time I actually ran that pipeline. The short version: it works, but the first


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