Skip to content

Repository files navigation

Python for Beginners

Learn Python by reading short notebooks and running small scripts — core syntax first, then the data stack (NumPy, Pandas, Matplotlib, Seaborn), then the real-world bits nobody teaches you: file handling, serialization, exceptions, threading, CLIs.

License Python Good first issues PRs welcome

Not sure where you stand? Take the level check quiz first, then start at the matching step below.


Quick start

git clone https://github.com/utk2103/Python-for-beginners.git
cd Python-for-beginners

python3 -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate

pip install -r requirements.txt
jupyter lab                       # or: jupyter notebook

Scripts need no setup beyond the standard library unless their header says otherwise:

python scripts/BinarySearch.py
python scripts/argparse_1.py 7 3 multiply

Learning path

Work top to bottom. Each notebook is self-contained, so you can also jump straight to a topic.

1. Core Python

Notebook Covers
Python basics variables, numeric/str/bool types, operators, I/O
Conditionals and booleans if/elif/else, truthiness, comparison chaining
Loops and iterators for, while, range, iterators vs iterables
Functions arguments, defaults, return values, scope
Lambda functions anonymous functions, map/filter/sorted(key=…)

2. Data structures

Notebook Covers
Lists indexing, slicing, list methods, comprehensions
Dictionaries key/value access, iteration, nesting

3. Real-world Python

Notebook Covers
Exception handling try/except/else/finally, raising, custom errors
File handling + serialization (1) reading/writing files, modes, context managers
File handling + serialization (2) JSON and pickle round-trips
Decorators & namespaces closures, @decorator, LEGB scope rules

4. The data stack

Notebook Covers
NumPy arrays, dtypes, shapes, broadcasting, vectorised math
Pandas Series/DataFrame, selection, cleaning, grouping
Matplotlib figures, axes, line/bar/scatter, labels and legends
Seaborn 1 → 2 → 3 → 4 statistical plots, distributions, categorical plots, heatmaps

5. Runnable scripts

Algorithms and small programs in scripts/ — searching, sorting, recursion, CLIs, threading, enum. A full index with one-line descriptions is issue #15, up for grabs.


Repository structure

Python-for-beginners/
├── notebooks/                 # Interactive lessons, one topic per notebook
├── scripts/                   # Standalone runnable .py files
├── Decorators & Namespaces/   # Decorator + scope notebook
├── data/                      # Small sample files (txt, json, pkl) for practice
├── docs/                      # Extra guides (pdf2docx setup, Tower of Hanoi visual)
├── resources/                 # Reference PDFs, cheat sheets, notes
├── requirements.txt           # Notebook + data-stack dependencies
└── .github/                   # Issue templates

Reference material

The resources/ folder holds PDFs for when you want a second explanation: a Python cheat sheet, Automate the Boring Stuff, Python Crash Course, a list of built-in methods, and 52 practice Q&As.


Contributing

New contributors are welcome, and this repo is a good place to make a first open-source PR.

  1. Browse good first issues.
  2. Comment on the one you want so nobody duplicates your work.
  3. Read CONTRIBUTING.md for the fork → branch → PR walkthrough and the style rules.

Ideas outside the open issues are welcome too — open an issue first so we can agree on the shape before you write code.

License

Apache License 2.0.

About

Here you can get everything you need to learn python as a begineer

Topics

Resources

Contributing

Stars

17 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages