Skip to content

"Python in Persian" is an open-source online book that offers a comprehensive tutorial on the Python programming language in Persian.

Notifications You must be signed in to change notification settings


Folders and files

Last commit message
Last commit date

Latest commit


Repository files navigation

Python in Persian (Updated with Python 3.11)

Documentation Status

This is an open-source and online book that provides a comprehensive tutorial on the Python programming language in Persian. The book is available at and covers a wide range of topics, including:

  • Introduction
  • Setup and starting a new project
  • Interactive mode
  • Data types and data structures
  • Control flow statements
  • File handling
  • Standard library
  • Functions
  • Decorator‌, Generator and lambda
  • Regular expressions
  • Object-oriented programming
  • Descriptors and Context Manager
  • Type hinting and Data class
  • Exception and Exception handling
  • Warning and Assertion
  • Date and Time

This book is designed for Persian-speaking learners without prior experience with programming languages. The book covers all the essential topics, from basic to intermediate programming, and each chapter includes code examples to help learners understand the material.

Getting Started

To get started with this book, you can:

  • Simply visit and start reading.

  • Download the source code from GitHub and run it on your local machine:

    $ git clone
    $ pip install -U pip
    $ pip install virtualenv
    $ python -m virtualenv .venv
    $ source .venv/bin/activate
    $ cd PythonPersianTutorial
    $ pip install -r requirements.txt
    $ make html
    $ cd ./build/html
    $ python -m http.server 8000

    then visit

  • Download the source code from GitHub and run it in Docker:

    $ git clone
    $ cd PythonPersianTutorial
    $ docker build -t pypersian .
    $ docker run -d --name pypersian -p 80:8000 pypersian

    then visit


If you'd like to contribute to the book, you can fork the repository on GitHub and submit a pull request with your changes. You can also open an issue to report errors.


This book was authored by Saeid Darvish.


This book is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License, which means you are free to use, copy, modify, merge, publish, and distribute the book for non-commercial purposes. Please see the license for more details.


Special thanks to the Python community and the contributors of open-source Python packages and libraries, without whom this book would not have been possible.