<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fidel Okumu</title>
    <description>The latest articles on DEV Community by Fidel Okumu (@fidel_okumu).</description>
    <link>https://dev.to/fidel_okumu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4009368%2F35d99d7c-fb31-43ed-82b0-6e897da85c1e.png</url>
      <title>DEV Community: Fidel Okumu</title>
      <link>https://dev.to/fidel_okumu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fidel_okumu"/>
    <language>en</language>
    <item>
      <title>Subqueries &amp; CTEs: Breaking Complex Queries into Steps</title>
      <dc:creator>Fidel Okumu</dc:creator>
      <pubDate>Thu, 10 Sep 2026 13:31:31 +0000</pubDate>
      <link>https://dev.to/fidel_okumu/subqueries-ctes-breaking-complex-queries-into-steps-2mlm</link>
      <guid>https://dev.to/fidel_okumu/subqueries-ctes-breaking-complex-queries-into-steps-2mlm</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
Some questions can't be answered with a single, flat SQL query — they require an intermediate step first. Subqueries and CTEs (Common Table Expressions) both solve this by letting one query's result feed into another, but they read and behave differently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Are Subqueries?&lt;/strong&gt;&lt;br&gt;
A subquery is a query nested inside another query, usually inside parentheses. It runs first, and its result is used by the outer query.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5sk392e8ych95oce0r0k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5sk392e8ych95oce0r0k.png" alt=" " width="764" height="208"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, the inner query (SELECT AVG(rides_completed) FROM drivers) calculates the average first. The outer query then uses that single number to filter drivers above it. What I understood here: the subquery is evaluated before the outer query can run, since the outer query depends on its result.&lt;/p&gt;

&lt;p&gt;Subqueries can also appear in the FROM clause, acting like a temporary table:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv32dm35rg2mdom64f3vq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv32dm35rg2mdom64f3vq.png" alt=" " width="799" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Are CTEs?&lt;/strong&gt;&lt;br&gt;
A CTE does the same job — precomputing an intermediate result — but is defined upfront using WITH, giving it a name that can be reused.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1r8ra3ht10afl4vzhu3l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1r8ra3ht10afl4vzhu3l.png" alt=" " width="800" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This produces the exact same result as the nested subquery example above, but the logic reads top-to-bottom instead of inside-out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I Learned&lt;/strong&gt;&lt;br&gt;
I learned that subqueries are queries placed inside another SQL query to help retrieve or filter data before the main query runs. They are useful when I need to use the result of one query to answer another question.&lt;/p&gt;

&lt;p&gt;I also learned that CTEs (Common Table Expressions) allow me to create a temporary named result using the "WITH" keyword and then use it in another query. CTEs queries easier to read, understand and organize. &lt;/p&gt;

&lt;p&gt;CTEs helps break down complex SQL problems into smaller and more manageable steps.&lt;/p&gt;

</description>
      <category>backend</category>
      <category>database</category>
      <category>sql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>SQL Joins: Combining Data Across Tables</title>
      <dc:creator>Fidel Okumu</dc:creator>
      <pubDate>Thu, 10 Sep 2026 12:34:28 +0000</pubDate>
      <link>https://dev.to/fidel_okumu/sql-joins-combining-data-across-tables-4hp4</link>
      <guid>https://dev.to/fidel_okumu/sql-joins-combining-data-across-tables-4hp4</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
Real databases rarely keep everything in one table — driver details, ride records, and route information usually live separately to avoid duplication. Joins are how SQL brings related data back together across those tables in a single query.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Are Joins?&lt;/strong&gt;&lt;br&gt;
A join links rows from two (or more) tables based on a shared column — usually an ID that appears in both. Without joins, I'd have to look up related information manually, one table at a time.&lt;br&gt;
&lt;strong&gt;Types of Joins&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;INNER JOIN&lt;/strong&gt; — returns only rows that match in both tables.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuahfwhkbwndbadjd5qxb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuahfwhkbwndbadjd5qxb.png" alt=" " width="799" height="97"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LEFT JOIN&lt;/strong&gt; — returns everything from the left table, plus matches from the right; unmatched right-side rows show as NULL.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fob2ma9th2zkgov06wsw8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fob2ma9th2zkgov06wsw8.png" alt=" " width="800" height="100"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RIGHT JOIN&lt;/strong&gt; — the mirror of LEFT JOIN: everything from the right table, plus matches from the left.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9x0xtzsddy7uucbzkhgu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9x0xtzsddy7uucbzkhgu.png" alt=" " width="800" height="106"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FULL OUTER JOIN&lt;/strong&gt; — combines LEFT and RIGHT: everything from both tables, matched where possible, NULL where not.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw2srmptfu1rr221yhetn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw2srmptfu1rr221yhetn.png" alt=" " width="798" height="90"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to Use Each&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;INNER JOIN&lt;/strong&gt; — when I only care about complete, matched records (e.g., "show me fares for drivers who actually have bookings").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LEFT JOIN&lt;/strong&gt; — when I need everything from my main table, even if some rows have no related data (e.g., "show me every driver, including those with zero bookings").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RIGHT JOIN&lt;/strong&gt; — functionally the same as LEFT JOIN with tables swapped; I rarely use it directly, since writing a LEFT JOIN with tables in the right order is usually clearer to read.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FULL OUTER JOIN&lt;/strong&gt; — when I need to audit for mismatches on both sides at once (e.g., finding bookings with no valid driver, and drivers with no bookings, in a single result).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What I Learned&lt;/strong&gt;&lt;br&gt;
The concept that took the most practice was realizing that a join isn't really "combining tables" in general — it's about deciding what happens to &lt;em&gt;unmatched&lt;/em&gt; rows on each side. Once I started asking "what do I want to happen to rows without a match" for every join I wrote, choosing between INNER, LEFT, RIGHT, and FULL OUTER became a matter of answering that one question rather than memorizing four separate syntaxes.&lt;/p&gt;

</description>
      <category>database</category>
      <category>programming</category>
      <category>sql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>DDL &amp; DML: The Two Halves of SQL</title>
      <dc:creator>Fidel Okumu</dc:creator>
      <pubDate>Thu, 10 Sep 2026 12:19:48 +0000</pubDate>
      <link>https://dev.to/fidel_okumu/ddl-dml-the-two-halves-of-sql-571h</link>
      <guid>https://dev.to/fidel_okumu/ddl-dml-the-two-halves-of-sql-571h</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
Working with a database always splits into two separate jobs: building the structure that will hold data, and then actually putting data in, changing it, or reading it. SQL separates these two jobs into two categories of commands — DDL and DML.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is DDL?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;DDL stands for &lt;strong&gt;Data Definition Language&lt;/strong&gt;. These commands define or change the &lt;em&gt;structure&lt;/em&gt; of a database — tables, columns, and their types — without touching the actual data inside.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example — creating a table:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw9ozhqiz50zqhvrjikdg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw9ozhqiz50zqhvrjikdg.png" alt=" " width="576" height="240"&gt;&lt;/a&gt;&lt;br&gt;
Adding a column to an existing table:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fltu9qzzq4pd5gdrocniq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fltu9qzzq4pd5gdrocniq.png" alt=" " width="530" height="94"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is DML?&lt;/strong&gt;&lt;br&gt;
DML stands for Data Manipulation Language. These commands work with the actual data inside the tables  inserting, updating, deleting, or retrieving rows.&lt;/p&gt;

&lt;p&gt;Example — inserting a row:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuq00kek3ct3qq0ia3tk2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuq00kek3ct3qq0ia3tk2.png" alt=" " width="799" height="64"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Updating a row:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzzrnrddtg32q46bugq15.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzzrnrddtg32q46bugq15.png" alt=" " width="444" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Deleting a row:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhr4bzff3a2vg45s1jmxm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhr4bzff3a2vg45s1jmxm.png" alt=" " width="410" height="92"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Retrieving data:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwi00rhewevyze0oh969e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwi00rhewevyze0oh969e.png" alt=" " width="580" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Difference&lt;/strong&gt;&lt;br&gt;
The distinction that clarified this for me: DDL changes the container, DML changes what's inside the container. Running CREATE TABLE builds an empty structure , no data exists yet. Only after that does INSERT (a DML command) actually put rows into it.&lt;/p&gt;

&lt;p&gt;Another important detail: most DDL commands are harder to undo. DROP TABLE deletes the table and everything in it, structure included — there's no "undo" in most database systems once it's committed. DML changes like DELETE or UPDATE are often reversible if wrapped in a transaction, but DDL is generally treated as a bigger, more permanent action.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I Learned&lt;/strong&gt;&lt;br&gt;
 Understanding that DDL commands run first, and rarely change once a table is in use, helped me realize why planning a table's structure carefully upfront (column types, primary keys) matters — going back to change it later with ALTER is possible, but riskier once real data and other queries already depend on that structure.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>database</category>
      <category>sql</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Python Basics: Variables, Data Types</title>
      <dc:creator>Fidel Okumu</dc:creator>
      <pubDate>Wed, 09 Sep 2026 06:01:42 +0000</pubDate>
      <link>https://dev.to/fidel_okumu/python-basics-variables-data-types-32a3</link>
      <guid>https://dev.to/fidel_okumu/python-basics-variables-data-types-32a3</guid>
      <description>&lt;p&gt;** Introduction**&lt;br&gt;
Before writing any meaningful program, I had to understand the four building blocks of Python: variables, data types, input/output, and basic syntax. This article walks through what each of these means, how they work, and practical examples of using them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Variables&lt;/strong&gt;&lt;br&gt;
A variable is a named container that holds a value. Instead of typing &lt;code&gt;"Amina"&lt;/code&gt; every time I refer to a driver, I can store it once:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwmluk9u3kopj0uih3ulq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwmluk9u3kopj0uih3ulq.png" alt=" " width="366" height="90"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once created, a variable's value can be reassigned at any point:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjp5292u1vbp9tyri76c4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjp5292u1vbp9tyri76c4.png" alt=" " width="796" height="73"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What I understood here is that a variable isn't the value itself , it's a label pointing to a value stored in memory. Reassigning it just moves the label to point somewhere else.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Types&lt;/strong&gt;&lt;br&gt;
Python automatically figures out the "type" of data a variable holds. The core types I worked with:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjpaq8ked366sdzwls36j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjpaq8ked366sdzwls36j.png" alt=" " width="590" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can check any variable's type using the built-in &lt;code&gt;type()&lt;/code&gt; function:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx2d1gjf98pp1vpf3aaoc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx2d1gjf98pp1vpf3aaoc.png" alt=" " width="764" height="52"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Input and Output&lt;/strong&gt;&lt;br&gt;
print() is how a Python program communicates back to the user, it's the "output".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F21fgs6z63l6br7e2uwzz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F21fgs6z63l6br7e2uwzz.png" alt=" " width="794" height="48"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Input() -it pauses the program and waits for the user to type something:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fccp9ef4vd670hgnsmbtu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fccp9ef4vd670hgnsmbtu.png" alt=" " width="604" height="82"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One important detail I learned: everything input() receives is treated as text (a string), even if the user types a number. So if I need to do math with it, I have to convert it explicitly:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc7ukb4dzu72eevy5t563.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc7ukb4dzu72eevy5t563.png" alt=" " width="800" height="65"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I Learned&lt;/strong&gt;&lt;br&gt;
The biggest shift in understanding was realizing that a variable's type isn't fixed by how it looks on screen , input() always hands back text, and it's my job to convert it to the right type before using it in calculations. This became a recurring theme as I moved into working with real project data, where columns coming from a database or CSV often needed the same kind of type checking before I could analyze them.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Operators and Conditionals: Making Decisions in Code</title>
      <dc:creator>Fidel Okumu</dc:creator>
      <pubDate>Wed, 09 Sep 2026 05:33:00 +0000</pubDate>
      <link>https://dev.to/fidel_okumu/operators-and-conditionals-making-decisions-in-code-38gl</link>
      <guid>https://dev.to/fidel_okumu/operators-and-conditionals-making-decisions-in-code-38gl</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
Once I understood variables and data types, the next question was, how does a program actually make a decision? This is where operators and conditionals come in. They let a script react differently depending on the data it's given.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Arithmetic Operators&lt;/strong&gt;&lt;br&gt;
These perform basic math:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqdc5jxigawnauzwsrbti.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqdc5jxigawnauzwsrbti.png" alt=" " width="800" height="179"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Comparison Operators&lt;/strong&gt;&lt;br&gt;
These compare two values and always produce a True or False:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg3ro1tuwjk5s3adkm109.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg3ro1tuwjk5s3adkm109.png" alt=" " width="799" height="111"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The distinction between = and == tripped me up early on : = assigns a value, == asks a question ("are these equal?"). Mixing them up is one of the most common beginner errors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Logical Operators&lt;/strong&gt;&lt;br&gt;
These combine multiple conditions:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcxa7kjhe7jxp3rblvb75.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcxa7kjhe7jxp3rblvb75.png" alt=" " width="800" height="152"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conditionals: if, elif, else&lt;/strong&gt;&lt;br&gt;
Conditionals use these True/False results to decide which block of code actually runs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq5kj55cn1d2i55focyvb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq5kj55cn1d2i55focyvb.png" alt=" " width="506" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's how I understood the flow: Python checks if first. If that's False, it moves to elif . If none of those match, it falls through to else. Only one of these blocks ever runs — never more than one, no matter how many conditions happen to be true.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I Learned&lt;/strong&gt;&lt;br&gt;
The core insight was that conditionals aren't really about if statements — they're about restructuring a problem into a series of True/False questions. Once data can be expressed as comparisons (is this value greater than X? does it meet two conditions at once?), the program can make the same kind of decision a person would, just applied consistently across thousands of rows without manual review.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>coding</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Loops: Repeating Work Without Repeating Code</title>
      <dc:creator>Fidel Okumu</dc:creator>
      <pubDate>Tue, 08 Sep 2026 12:51:33 +0000</pubDate>
      <link>https://dev.to/fidel_okumu/loops-repeating-work-without-repeating-code-2lda</link>
      <guid>https://dev.to/fidel_okumu/loops-repeating-work-without-repeating-code-2lda</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;Introduction&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
A huge part of programming is doing the same action many times — checking every driver in a list, processing every row of data, or repeating a task until a condition is met. Loops are how Python handles this without forcing me to copypaste the same line over and over.&lt;br&gt;
&lt;strong&gt;For Loops&lt;/strong&gt;&lt;br&gt;
A for loop runs a block of code once for every item in a collection.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkvkzyc7d852pt14qb8uk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkvkzyc7d852pt14qb8uk.png" alt=" " width="748" height="200"&gt;&lt;/a&gt;&lt;br&gt;
What I understood here: driver is a temporary variable that takes on each value in drivers, one at a time in order. The loop runs exactly as many times as there are items in the list four times, in this case.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;While Loops&lt;/strong&gt;&lt;br&gt;
A while loop repeats until a condition becomes false, rather than looping over a fixed collection.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbymf8jf7s8pakfp2an9m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbymf8jf7s8pakfp2an9m.png" alt=" " width="798" height="87"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The detail that took the most getting used to: the condition is checked before every round, and the loop starts counting from 0. So while rides_completed &amp;lt; 3 actually runs 3 times (for 0, 1, 2), not what I initially assumed. Forgetting the += 1 line entirely would make the condition stay true forever, causing an infinite loop — one of the most common mistakes with while loops.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Break and Continue&lt;/strong&gt;&lt;br&gt;
These give more control over a loop's execution:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzgjrm8bk6l4505sgb5qu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzgjrm8bk6l4505sgb5qu.png" alt=" " width="799" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The distinction: break exits the loop immediately and nothing after it runs, not even for remaining items. continue only skips the current round the loop still checks every other item normally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enumerate()&lt;/strong&gt;&lt;br&gt;
Sometimes I need both the item and its position in the list. Enumerate() provides both at once:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzbw82octoh61mybqd4m7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzbw82octoh61mybqd4m7.png" alt=" " width="712" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I Learned&lt;/strong&gt;&lt;br&gt;
I learned that loops allow Python to repeat instructions automatically until a certain condition is met or until all items have been processed. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>coding</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Functions: Writing Reusable Code</title>
      <dc:creator>Fidel Okumu</dc:creator>
      <pubDate>Tue, 08 Sep 2026 12:22:51 +0000</pubDate>
      <link>https://dev.to/fidel_okumu/functions-writing-reusable-code-g65</link>
      <guid>https://dev.to/fidel_okumu/functions-writing-reusable-code-g65</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
As my scripts grew longer, I noticed the same blocks of logic showing up again and again.&lt;br&gt;
Functions  lets a user write a piece of logic once and reuse it anywhere, with different data each time. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Defining and Calling Functions&lt;/strong&gt;&lt;br&gt;
Defining a function only saves its instructions — it doesn't run anything yet:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F07m7xk3hq4tcoej5mec5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F07m7xk3hq4tcoej5mec5.png" alt=" " width="546" height="118"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Calling it is what actually executes the code:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyukt2tiyuvyafcl97qkm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyukt2tiyuvyafcl97qkm.png" alt=" " width="756" height="92"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Parameters and Arguments&lt;/strong&gt;&lt;br&gt;
A parameter is the placeholder name written inside the function definition — an empty slot waiting for a value.&lt;br&gt;
 An argument is the real value handed over when the function is actually called.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkyo9k6xhwqqrnx26pzs5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkyo9k6xhwqqrnx26pzs5.png" alt=" " width="800" height="120"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A function can take multiple parameters&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgp24odeqmyu9ix7983aj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgp24odeqmyu9ix7983aj.png" alt=" " width="628" height="164"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Return Values&lt;/strong&gt;&lt;br&gt;
Return sends a value back to whoever called the function, so it can be stored and reused elsewhere — unlike print(), which only displays something once.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbhif66inby2bqnx6wpst.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbhif66inby2bqnx6wpst.png" alt=" " width="800" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An important detail: as soon as a function hits a return statement, it exits immediately. Any code written after return inside that function never runs&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I Learned&lt;/strong&gt;&lt;br&gt;
Functions reframed how I think about writing code — instead of asking "what should this line do," I started asking "what small reusable task does this represent?, and what inputs does it need?." Understanding parameters versus arguments, and that variables inside a function have their own separate scope&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>coding</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>PYTHON Data Structures lists, Tuples, Dictionaries and Sets</title>
      <dc:creator>Fidel Okumu</dc:creator>
      <pubDate>Tue, 08 Sep 2026 11:50:15 +0000</pubDate>
      <link>https://dev.to/fidel_okumu/python-data-structures-lists-tuples-dictionaries-and-sets-5ghl</link>
      <guid>https://dev.to/fidel_okumu/python-data-structures-lists-tuples-dictionaries-and-sets-5ghl</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;INTRODUCTION&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
After learning storing single values in variables, We needed a way to hold collection of data i.e multiple ride counts&lt;br&gt;
multiple cities etc. &lt;br&gt;
Python offers four main data structures for this that is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LISTS&lt;/strong&gt;&lt;br&gt;
A list is a built-in data type used to store multiple items in a single variable. &lt;br&gt;
A list can be changed and allows addition of more items&lt;br&gt;
It can also contain items of different data types&lt;br&gt;
Lists also preserve and allows duplicate values&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp1kyhfj232oho596nruj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp1kyhfj232oho596nruj.png" alt=" " width="797" height="60"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frifzchl2rohe3dvqn2p5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frifzchl2rohe3dvqn2p5.png" alt=" " width="798" height="40"&gt;&lt;/a&gt;&lt;br&gt;
![ ](&lt;a href="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/njfzoohpy0tokgot2si1.png" rel="noopener noreferrer"&gt;https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/njfzoohpy0tokgot2si1.png&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TUPLES&lt;/strong&gt;&lt;br&gt;
A tuple is similar to a list but once created, it cannot be changed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsdbx9ixu099rach9dl9p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsdbx9ixu099rach9dl9p.png" alt=" " width="496" height="38"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Trying to modify a tuple raises an error by design. &lt;br&gt;
Tuples are mainly used when values should stay fixed throughout a program example: routes  fixed origin and destinations.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu1mka1leicksi8cg95aj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu1mka1leicksi8cg95aj.png" alt=" " width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DICTIONARIES&lt;/strong&gt;&lt;br&gt;
A dictionary stores data in key-value.&lt;br&gt;
This allows lookups by name instead of position&lt;br&gt;
example;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4z486wrqa02tof3wojun.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4z486wrqa02tof3wojun.png" alt=" " width="799" height="179"&gt;&lt;/a&gt;&lt;br&gt;
Dictionaries are written in curly brackets {} &lt;br&gt;
Each has a corresponding value &lt;br&gt;
The keys should be unique &lt;br&gt;
Dictionaries can be changed &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SETS&lt;/strong&gt;&lt;br&gt;
A set stores only unique values any duplicates are automatically removed&lt;br&gt;
They are written using curly brackets {}&lt;br&gt;
You can add or remove items in a set &lt;br&gt;
They are useful when keeping unique items &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpv6qlaiwo8121e48m5iz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpv6qlaiwo8121e48m5iz.png" alt=" " width="800" height="94"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I Learned&lt;/strong&gt;&lt;br&gt;
The most useful shift in understanding was realizing that choosing a data structure is really a design decision, not just a syntax choice. Picking a list when a dictionary is more appropriate (or vice versa) doesn't just look sloppy — it makes later code longer and harder to reason about. Matching the structure to what the data actually needs to do made every function I wrote afterward noticeably simpler.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>computerscience</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
