Skip to content

About

Python fundamentals — a self-study repo covering syntax, data structures, OOP .

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

61 Commits

Folders and files

Repository files navigation

Python Fundamentals

A structured and practical collection of Python fundamentals and core concepts, created as part of my journey toward professional backend development.

This repository focuses on understanding Python through practical examples, organized code, and backend-oriented use cases.


About

This repository covers Python from fundamental syntax and data structures to more advanced concepts such as object-oriented programming, decorators, type hints, testing, and dependency management.

The goal is not only to learn Python syntax, but also to build a strong foundation for working with frameworks such as Django and Django REST Framework.


Topics Covered

01. Basics

  • Variables
  • Data Types
  • Input and Output
  • Type Conversion
  • Python Fundamentals

02. Operators

  • Arithmetic Operators
  • Comparison Operators
  • Logical Operators
  • Assignment Operators
  • Operator Precedence

03. Conditionals

  • if
  • elif
  • else
  • Nested Conditions
  • Conditional Expressions
  • match / case

04. Loops

  • for
  • while
  • range()
  • break
  • continue
  • pass
  • Nested Loops
  • Loop Patterns

05. Data Structures

  • Lists
  • Tuples
  • Sets
  • Dictionaries
  • Nested Data Structures
  • Comprehensions

06. Functions

  • Function Definition
  • Parameters and Arguments
  • Return Values
  • Default Arguments
  • Keyword Arguments
  • *args
  • **kwargs
  • Lambda Functions
  • Function Comprehensions

07. Strings

  • String Indexing
  • Slicing
  • String Methods
  • Searching
  • Replacing
  • Splitting and Joining
  • String Formatting
  • f-Strings

08. Error Handling

  • Exceptions
  • try
  • except
  • else
  • finally
  • raise
  • Custom Exceptions
  • Exception Hierarchies

09. Object-Oriented Programming

  • Classes and Objects
  • Attributes and Methods
  • Encapsulation
  • Inheritance
  • Polymorphism
  • Abstraction
  • Abstract Base Classes
  • Magic Methods

10. Modules and Packages

  • Modules
  • Imports
  • Packages
  • __init__.py
  • Standard Library
  • Absolute and Relative Imports
  • Package Structure

11. File Handling

  • Reading Files
  • Writing Files
  • CSV Files
  • JSON Files
  • File Paths
  • pathlib
  • File System Operations

12. Dates and Times

  • date
  • time
  • datetime
  • timedelta
  • Timezones
  • ZoneInfo
  • Date Formatting
  • Date Parsing
  • ISO 8601

13. Iterators and Generators

  • Iterable Objects
  • Iterators
  • iter()
  • next()
  • StopIteration
  • Generator Functions
  • yield
  • Generator Expressions
  • Lazy Evaluation

14. Decorators

  • Functions as Objects
  • Nested Functions
  • Closures
  • Function Wrappers
  • Decorators
  • functools.wraps
  • Authentication Decorators
  • Permission Decorators
  • Logging
  • Caching
  • Retry Patterns

15. Type Hints

  • Variable Annotations
  • Function Type Hints
  • Optional
  • Union
  • Literal
  • TypedDict
  • Callable
  • Iterable
  • Iterator
  • TypeVar
  • Generic
  • Protocol
  • TypeAlias
  • NewType
  • Final
  • ClassVar
  • Self
  • ParamSpec
  • overload
  • Type-Safe Decorators

16. Testing

  • unittest
  • pytest
  • Test Cases
  • Assertions
  • Fixtures
  • Parametrization
  • Mocking
  • monkeypatch
  • Temporary Files
  • Test Discovery
  • Unit Testing Practices

17. Environment and Dependencies

  • Virtual Environments
  • venv
  • pip
  • Package Installation
  • Package Versions
  • requirements.txt
  • Dependency Management
  • Reproducible Environments

Repository Structure

python-fundamentals/
│
├── 01-basics/
├── 02-operators/
├── 03-conditionals/
├── 04-loops/
├── 05-data-structures/
├── 06-functions/
├── 07-strings/
├── 08-error-handling/
├── 11-oop/
├── 12-modules-and-packages/
├── 13-file-handling/
├── 14-dates-and-times/
├── 15-iterators-and-generators/
├── 16-decorators/
├── 17-type-hints/
├── 18-testing/
└── 19-environment-and-dependencies/

Each directory contains focused Python examples demonstrating the corresponding concepts.
Learning Approach
The examples in this repository focus on:
- Understanding concepts through code
- Writing readable Python
- Using practical examples
- Applying Python concepts to backend development
- Understanding common Python patterns
- Building a foundation for Django development
- Writing testable and maintainable code
The examples are intentionally organized from simpler concepts toward more advanced Python features.
Related Coursework
This repository complements my formal Python coursework and certifications.
Harvard CS50P
Completed CS50's Introduction to Programming with Python by Harvard University.
The course provided a structured introduction to programming with Python, while this repository serves as a personal reference and practical implementation of Python concepts.
Next Step
After completing these Python fundamentals, the next stage of my learning path is focused on backend development with Django and Django REST Framework.
Planned technologies include:
- Django
- Django REST Framework
- PostgreSQL
- Redis
- Celery
- Docker
- Linux
- REST APIs
- Testing
- Deployment
Goal
The purpose of this repository is to build a strong and practical Python foundation that can be applied to real-world software engineering and backend development.

About

Python fundamentals — a self-study repo covering syntax, data structures, OOP .

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages