{
  "id": 8768519,
  "title": "Python Finally Started Making Sense When I Stopped Treating It Like Magic 🐍",
  "url": "https://urgent.news/2026/09/20/python-finally-started-making-sense-when-i-stopped-treating-it-like",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-20T20:50:21.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/nelly_gitonga/python-finally-started-making-sense-when-i-stopped-treating-it-like-magic-3mii"
  },
  "original_language": "en",
  "account": "I remember my first encounter with Python. I stared at the code, bewildered. \"How does a computer comprehend this?\" I wondered. Variables, strings, integers, floats, booleans - it felt like learning an entirely new language. But as I practiced the fundamentals, Python began to make sense. Here are some revelations that transformed my understanding.\n\n1. Variables are like small boxes. I could label them: name, age, city. Then I could assign values to them: name = \"Amina Wanjiku\", age = 24, city = \"Nairobi\". Python understood: \"name equals Amina Wanjiku, age equals 24, city equals Nairobi\". Asking Python to display the contents was simple: print(name), print(age), print(city). This made programming feel less mysterious - variables were just named storage for data.\n\n2. Not all numbers are the same to computers. Consider 7 and \"7\". In Python, 7 is an integer, while \"7\" is text. When I added them: print(7 + 7) = 14, but print(\"7\" + \"7\") = \"77\". Python doesn't care about the appearance of data; it cares about the data type. This simple distinction opened my eyes to the importance of data types in programming.\n\n3. Python has four basic data types to start: strings (str), integers (int), floats (float), and booleans (bool). I met them one by one: name = \"Nelly\", age = 22, balance = 74670.50, is_student = True. When I got confused about a variable's type, Python stepped in to clarify: print(type(age)) would respond with \"<class 'int'>\". Python was my guide in understanding data types.\n\n4. I learned how to make Python interact with me through the input() function. Before, my programs were strictly instructions from me to Python. But with input(), I could ask the user questions. For example:\nname = input(\"What is your name? \")\nprint(\"Hello\", name)\nThis allowed my program to have a conversation with the user, making it interactive and dynamic.\n\n5. Applying my accounting background to Python was a thrilling experience. I created a simple money transfer program:\nsender = input(\"Enter sender name:\")\nrecipient = input(\"Enter recipient name:\")\namount = int(input(\"Enter amount to send (Ksh):\"))\ncharge = 11\ntotal = amount + charge\nThis code calculated the total cost of a money transfer, integrating my financial knowledge with programming. It was exciting to see Python's potential in real-world applications.\n\n6. Finally, I discovered f-strings. They made my print statements cleaner and more readable:\nInstead of:\nprint(\"Name:\", name, \"Age:\", age)\nI could write:\nprint(f\"Name: {name}, Age: {age}\")\nThis concise syntax was a game-changer, streamlining my code and making it easier to understand.",
  "summary": "I’ll be honest. When I first started learning Python, I looked at code and thought: “Okay... but why does the computer understand this?” 😂 There were variables, strings, integers, floats, booleans, input() , type() , f-strings... It felt like learning a new language where everyone had forgotten to give me the dictionary.But after practicing the basics, something started to click. Python isn't…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}