{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreifjlzzwcom2sxuwh4x4aowi33fybvjkqe27ektrfo2njuud6gbhkq",
    "uri": "at://did:plc:25rdn5elo5izoxrmtis34zuk/app.bsky.feed.post/3moowrcaw6zn2"
  },
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreia46rc2mwv73qvz6ksa3jcbz7qijekwnwwahd5ofzblqeybqwcepm"
    },
    "mimeType": "image/webp",
    "size": 60746
  },
  "path": "/ramesh_s_a8f0867d239e927c/python-for-beginners-part-1-getting-started-syntax-42ho",
  "publishedAt": "2026-06-20T03:10:31.000Z",
  "site": "https://dev.to",
  "tags": [
    "beginners",
    "programming",
    "python",
    "tutorial",
    "python.org/downloads"
  ],
  "textContent": "_A beginner-friendly series on learning Python from scratch, one concept at a time._\n\nIf you've ever wanted to learn programming but felt intimidated by curly braces, semicolons, and confusing syntax — Python is where you start breathing easy. It reads almost like English, and it's one of the most in-demand languages in the world today, used everywhere from web apps to data science to automation scripts.\n\nThis is Part 1 of a beginner series that will take you from \"what even is Python\" to writing real, working programs. Let's begin.\n\n##  What is Python?\n\nPython is a general-purpose programming language created by Guido van Rossum and first released in 1991. It's popular because of three big reasons:\n\n  * **It's beginner-friendly.** The syntax is clean and close to natural language.\n  * **It's versatile.** You can build websites, automate tasks, analyze data, train machine learning models, or write small scripts — all with Python.\n  * **It has a massive ecosystem.** Thousands of ready-made libraries mean you rarely build things from scratch.\n\n\n\nPython runs on Windows, macOS, and Linux, and it's free and open source.\n\n##  Installing Python\n\nMost systems can run Python after a quick install:\n\n  1. Go to python.org/downloads and grab the latest stable version.\n  2. During installation on Windows, make sure to check **\"Add Python to PATH\"** — this saves you a lot of headaches later.\n  3. Verify the install by opening your terminal (Command Prompt, PowerShell, or your Mac/Linux terminal) and typing:\n\n\n\n\n    python --version\n\n\nIf you see something like `Python 3.13.0`, you're good to go.\n\n> **Tip:** On some systems (especially macOS/Linux), you might need to type `python3` instead of `python`.\n\n##  Your First Python Program\n\nOpen a terminal, type `python`, hit Enter, and you'll land inside the **Python interactive shell**. Try this:\n\n\n\n    print(\"Hello, World!\")\n\n\nYou should see:\n\n\n\n    Hello, World!\n\n\nCongratulations — you just wrote your first Python program. `print()` is a built-in function that displays output on the screen.\n\nFor anything beyond one-liners, you'll want to write code in a `.py` file instead of the shell. Create a file called `hello.py`:\n\n\n\n    print(\"Hello, World!\")\n\n\nThen run it from your terminal:\n\n\n\n    python hello.py\n\n\n##  Python Syntax: The Basics\n\nPython's syntax is what makes it stand out from languages like Java or C++. Here's what you need to know early on.\n\n###  No semicolons, no curly braces\n\nMost languages need `;` to end a line and `{}` to define blocks of code. Python uses neither. Instead, it relies on **line breaks** and **indentation**.\n\n\n\n    print(\"This line ends with nothing special\")\n\n\n###  Indentation defines structure\n\nThis is the single most important rule in Python. Indentation (spaces at the start of a line) isn't just for readability — it's part of the language's syntax. It tells Python which lines belong together.\n\n\n\n    if 5 > 2:\n        print(\"Five is greater than two!\")\n\n\nThe line `print(\"Five is greater than two!\")` is indented, which tells Python it belongs _inside_ the `if` block. If you don't indent it, Python will throw an error:\n\n\n\n    if 5 > 2:\n    print(\"This will cause an IndentationError\")\n\n\n**Rule of thumb:** use 4 spaces per indentation level, and stay consistent. Most code editors do this automatically.\n\n###  Case sensitivity\n\nPython treats uppercase and lowercase letters as different. `age`, `Age`, and `AGE` are three separate variables.\n\n###  One statement per line (usually)\n\nUnlike some languages, you generally write one instruction per line in Python:\n\n\n\n    x = 5\n    y = 10\n    print(x + y)\n\n\nYou _can_ squeeze multiple statements onto one line using a semicolon, but it's considered bad style and rarely used:\n\n\n\n    x = 5; y = 10; print(x + y)\n\n\n##  Comments in Python\n\nComments are notes in your code that Python ignores when running the program. They're there purely for humans — to explain what the code does, leave reminders, or temporarily disable a line.\n\n###  Single-line comments\n\nUse a `#` symbol:\n\n\n\n    # This is a comment\n    print(\"Hello, World!\")  # This prints a greeting\n\n\nAnything after `#` on that line is ignored by Python.\n\n###  Multi-line comments\n\nPython doesn't have a dedicated multi-line comment symbol, but there are two common workarounds:\n\n**Option 1 — a`#` on every line:**\n\n\n\n    # This is a comment\n    # written across\n    # multiple lines\n    print(\"Hello, World!\")\n\n\n**Option 2 — a multi-line string that isn't assigned to anything:**\n\n\n\n    \"\"\"\n    This is also\n    a comment,\n    technically a string Python evaluates and discards\n    \"\"\"\n    print(\"Hello, World!\")\n\n\nThis second method isn't a \"true\" comment (it's a string literal Python briefly creates and throws away), but it's commonly used for quick documentation blocks.\n\n##  Why This Matters\n\nIndentation and clean syntax aren't just stylistic choices in Python — they're enforced by the language itself. This is intentional. Python's design philosophy (\"The Zen of Python\") leans heavily on readability: code should look the same regardless of who wrote it. Once this clicks, you'll find Python code far easier to read than most other languages, even months after you wrote it yourself.\n\n##  What's Next\n\nIn Part 2, we'll cover **variables, data types, and numbers** — how Python stores information, the rules for naming variables, and how to work with different types of data.\n\n_This is Part 1 of a beginner Python series. Follow along for the rest of the series covering strings, control flow, functions, collections, error handling, and object-oriented programming._",
  "title": "Python for Beginners — Part 1: Getting Started & Syntax"
}