From “Python Tutorial for Beginners - Learn the basics in 20 Min” by Tech With Tim
Python basics for beginners, built step by step
Zero to your first working Python program in twenty minutes.
Terms
- Variable — A container that stores a value so it can be used later under a name. 4:43
- Integer (int) — A whole number, which can be negative, zero or very large. 5:12
- Float — A number with a decimal point, such as 5.9 or 5.0. 5:21
- Concatenation — Joining strings together with the plus sign; the join adds no spaces unless you add them. 7:42
- Input — The input function asks the user for text; what it returns is always a string. 9:26
- If, elif, else — Conditions run blocks of code in order; else is the catch-all that runs when nothing above is true. 12:42
- For loop and range — A for loop repeats code once for each item in a list; range(5) produces 0 to 4. 14:37
- Indentation — Python uses indented blocks to show which lines belong to an if, loop or function. 13:03
What you need
- Python installed — The standalone Python installer with Add python.exe to PATH ticked
- VS Code — Visual Studio Code editor, free to download
- Python extension — The official Python extension from Microsoft, added from the Extensions view
Steps
- 1. Install Python: Download the standalone installer from the Python downloads page, run it, tick Add python.exe to PATH and keep the default options. 0:47
- 2. Set up VS Code: Install Visual Studio Code, create a Demo folder through Open Folder, and add the official Python extension from the Extensions view. 1:14
- 3. Create demo.py: Use New File in the Explorer view and name it demo.py; the .py ending marks it as a Python file. 2:40
- 4. Write and run hello world: Type print("hello world") and press the Run Python File play button; the output appears in the terminal. 3:59
What you need before you start
Things worth a closer look
- Python 3.14.6 standalone installer — The Python downloads page shows a button labelled Python 3.14.6 under Download for Windows.
- Add python.exe to PATH checkbox — The Python 3.14.6 setup window has the Add python.exe to PATH box ticked at the bottom.
- Printed list output — The terminal prints the list as ['apples', 'bread', 'milk', 'carrot'] after the append.
- Print documentation tooltip — A tooltip lists print's parameters sep, end and file, with a description of the sep and end arguments.
Learn Flexbox CSS: axes, alignment and item propertiesSlaying The Dragon
Building an AI agent in pure PythonTech With Tim
Setting up Claude Code and building games with itTech With Tim
Building an authenticated MCP server in PythonTech With Tim