Learn Python from scratch β clean examples, practice problems and notes, organised topic by topic.
Quick Start β’ Topics β’ Structure β’ Commands β’ Contributing β’ License
Core Python is a beginner-friendly repository that covers the fundamentals of Python with small, runnable programs. Each topic has its own folder, so you can learn in order or jump straight to what you need.
- β Simple, well-commented code
- β Practice problems after every topic
- β Works on Windows, macOS and Linux
- β No external libraries needed for the core lessons
β If this repository helps you, please star it. It helps other learners find it too.
Get running in under a minute.
git clone https://github.com/yashsdhinoja/Core-Python.gitcd Core-Pythonπͺ Windows
python -m venv venv
venv\Scripts\activateπ macOS / π§ Linux
python3 -m venv venv
source venv/bin/activatepython 01-basics/hello_world.pyπ‘ Replace the path with any
.pyfile from the repository.
| # | Topic | What you will learn | Level |
|---|---|---|---|
| 01 | Basics | Variables, data types, input/output, operators | π’ Beginner |
| 02 | Control Flow | if / elif / else, loops, break, continue |
π’ Beginner |
| 03 | Data Structures | Lists, tuples, sets, dictionaries, comprehensions | π’ Beginner |
| 04 | Functions | Arguments, *args / **kwargs, lambda, recursion |
π‘ Intermediate |
| 05 | OOP | Classes, inheritance, polymorphism, dunder methods | π‘ Intermediate |
| 06 | File Handling | Read/write files, CSV, JSON | π‘ Intermediate |
| 07 | Exceptions | try / except / finally, custom exceptions |
π‘ Intermediate |
| 08 | Modules & Packages | Imports, standard library, pip |
π‘ Intermediate |
| 09 | Advanced | Decorators, generators, iterators, context managers | π΄ Advanced |
π Edit this table so it matches the folders you have actually uploaded.
Core-Python/
βββ 01-basics/ # variables, types, operators
βββ 02-control-flow/ # conditions and loops
βββ 03-data-structures/ # list, tuple, set, dict
βββ 04-functions/ # functions, lambda, recursion
βββ 05-oop/ # classes and objects
βββ 06-file-handling/ # files, CSV, JSON
βββ 07-exceptions/ # error handling
βββ 08-modules/ # modules and packages
βββ 09-advanced/ # decorators, generators
βββ practice/ # exercises and solutions
βββ LICENSE
βββ README.md# 01-basics/hello_world.py
name = input("Enter your name: ")
print(f"Hello, {name}! Welcome to Core Python π")Output
Enter your name: Yash
Hello, Yash! Welcome to Core Python π
| Task | Command |
|---|---|
| Check Python version | python --version |
| Run a script | python file_name.py |
| Open interactive shell | python |
| Run a module | python -m module_name |
| Run all tests (if added) | python -m unittest discover |
| Task | Command |
|---|---|
| Install a package | pip install package_name |
| Install from file | pip install -r requirements.txt |
| Save installed packages | pip freeze > requirements.txt |
| List packages | pip list |
| Upgrade pip | python -m pip install --upgrade pip |
| Task | Windows | macOS / Linux |
|---|---|---|
| Create | python -m venv venv |
python3 -m venv venv |
| Activate | venv\Scripts\activate |
source venv/bin/activate |
| Deactivate | deactivate |
deactivate |
| Task | Command |
|---|---|
| Get latest changes | git pull origin main |
| Create a branch | git checkout -b feature/your-feature |
| Stage all changes | git add . |
| Commit | git commit -m "feat: add your change" |
| Push | git push origin feature/your-feature |
- Python basics
- Control flow
- Data structures
- Functions & recursion
- Object-oriented programming
- File handling
- Exceptions
- Modules & packages
- Decorators & generators
- Mini projects (calculator, to-do app, quiz game)
Contributions, issues and feature requests are welcome!
- Fork this repository
- Create a branch:
git checkout -b feature/AmazingFeature - Commit your changes:
git commit -m "feat: add AmazingFeature" - Push to your branch:
git push origin feature/AmazingFeature - Open a Pull Request
| Commit prefix | Use for |
|---|---|
feat: |
New program or topic |
fix: |
Bug fix in an example |
docs: |
README or notes changes |
refactor: |
Cleaner code, same behaviour |
Found a problem? Open an issue.
Distributed under the MIT License. See LICENSE for details.
| Platform | Link |
|---|---|
| GitHub | @yashsdhinoja |
| Add your LinkedIn link |
Made with β€οΈ by Yash