Live
Black Hat USADark ReadingBlack Hat AsiaAI BusinessA Developer's Introduction to Generative AIDEV CommunityAI Coding Tip 014 - One AGENTS.md Is Hurting Your AI Coding AssistantHackernoon AIHow to Build a Multi-Model AI Architecture That ScalesMedium AIPeter Diamandis’ Thought Experiment and What Grok Told Me About ItMedium AIDay One of the Content Pipeline: What Broke and What I FixedDEV CommunityAI has arrived in auditing. Are regulators ready?Financial Times TechLet technology explore what the voters really wantFinancial Times TechI’m 100x More Productive and More Exhausted Than EverMedium AICompetency Questions as Executable Plans: a Controlled RAG Architecture for Cultural Heritage StorytellingArXiv CS.AII must delete the evidence: AI Agents Explicitly Cover up Fraud and Violent CrimeArXiv CS.AIInterpretable Deep Reinforcement Learning for Element-level Bridge Life-cycle OptimizationArXiv CS.AIA Comprehensive Framework for Long-Term Resiliency Investment Planning under Extreme Weather Uncertainty for Electric UtilitiesArXiv CS.AIBlack Hat USADark ReadingBlack Hat AsiaAI BusinessA Developer's Introduction to Generative AIDEV CommunityAI Coding Tip 014 - One AGENTS.md Is Hurting Your AI Coding AssistantHackernoon AIHow to Build a Multi-Model AI Architecture That ScalesMedium AIPeter Diamandis’ Thought Experiment and What Grok Told Me About ItMedium AIDay One of the Content Pipeline: What Broke and What I FixedDEV CommunityAI has arrived in auditing. Are regulators ready?Financial Times TechLet technology explore what the voters really wantFinancial Times TechI’m 100x More Productive and More Exhausted Than EverMedium AICompetency Questions as Executable Plans: a Controlled RAG Architecture for Cultural Heritage StorytellingArXiv CS.AII must delete the evidence: AI Agents Explicitly Cover up Fraud and Violent CrimeArXiv CS.AIInterpretable Deep Reinforcement Learning for Element-level Bridge Life-cycle OptimizationArXiv CS.AIA Comprehensive Framework for Long-Term Resiliency Investment Planning under Extreme Weather Uncertainty for Electric UtilitiesArXiv CS.AI
AI NEWS HUBbyEIGENVECTOREigenvector

Day 61 of #100DaysOfCode — Python Refresher Part 1

DEV Communityby M Saad AhmadApril 4, 20264 min read1 views
Source Quiz

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 # boolean

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.

for i in range(3):  print(i)

Enter fullscreen mode

Exit fullscreen mode

count = 0 while count < 3:  print(count)  count += 1

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.

def add(a, b):  return a + b

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.

numbers = [1, 2, 3, 4] print(numbers[0]) # 1

Enter fullscreen mode

Exit fullscreen mode

Dictionaries

Dictionaries store data in key-value pairs, similar to objects in JavaScript.

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)

Enter fullscreen mode

Exit fullscreen mode

Nested data handling

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}

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)

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}"

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()

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)
*

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!

Was this article helpful?

Sign in to highlight and annotate this article

AI
Ask AI about this article
Powered by Eigenvector · full article context loaded
Ready

Conversation starters

Ask anything about this article…

Daily AI Digest

Get the top 5 AI stories delivered to your inbox every morning.

More about

versionapplicationperspective

Knowledge Map

Knowledge Map
TopicsEntitiesSource
Day 61 of #…versionapplicationperspectiveDEV Communi…

Connected Articles — Knowledge Graph

This article is connected to other articles through shared AI topics and tags.

Knowledge Graph100 articles · 191 connections
Scroll to zoom · drag to pan · click to open

Discussion

Sign in to join the discussion

No comments yet — be the first to share your thoughts!

More in Releases