An open API service indexing awesome lists of open source software.

https://github.com/albertkarapetyan/top-50-python-builtins

Top 50 Python Built-in Functions Every Developer Should Know Топ-50 встроенных функций Python, которые должен знать каждый разработчик
https://github.com/albertkarapetyan/top-50-python-builtins

builtin-functions python python3

Last synced: about 2 months ago
JSON representation

Top 50 Python Built-in Functions Every Developer Should Know Топ-50 встроенных функций Python, которые должен знать каждый разработчик

Awesome Lists containing this project

README

        

# 🐍 Top 50 Python Built-in Functions Every Developer Should Know

## Топ-50 встроенных функций Python, которые должен знать каждый разработчик

### 📥 Input and Output / Ввод и вывод
- **print()** — Prints text or variables to the console
Выводит текст или переменные в консоль
- **input()** — Accepts input from the user
Запрашивает ввод от пользователя
- **open()** — Opens a file and returns a file object
Открывает файл и возвращает объект файла

### 🔁 Type Conversion / Преобразование типов
- **str()** — Converts an object to a string
Преобразует объект в строку
- **int()** — Converts a string or number to an integer
Преобразует строку или число в целое число
- **float()** — Converts a string or number to a floating-point number
Преобразует строку или число в число с плавающей точкой
- **list()** — Creates a list from an iterable
Создаёт список из итерируемого объекта
- **tuple()** — Creates a tuple from an iterable
Создаёт кортеж из итерируемого объекта
- **dict()** — Creates a dictionary
Создаёт словарь
- **set()** — Creates a set
Создаёт множество

### 🔢 Working with Sequences / Работа с последовательностями
- **len()** — Returns the length of an object
Возвращает длину объекта
- **range()** — Generates a sequence of numbers
Генерирует последовательность чисел
- **sorted()** — Returns a sorted list from an iterable
Возвращает отсортированный список
- **enumerate()** — Returns indices and values
Возвращает пары индекс-значение
- **zip()** — Combines multiple iterables
Объединяет несколько итерируемых объектов
- **reversed()** — Returns a reversed iterator
Возвращает обратный итератор

### ➕ Math and Logic / Арифметика и логика
- **sum()** — Returns the sum of elements
Возвращает сумму элементов
- **max()** — Returns the largest element
Возвращает наибольший элемент
- **min()** — Returns the smallest element
Возвращает наименьший элемент
- **abs()** — Returns the absolute value
Возвращает абсолютное значение
- **round()** — Rounds a number
Округляет число
- **pow()** — Raises a number to a power
Возводит число в степень

### ✅ Truth Testing / Проверка условий
- **all()** — True if all elements are true
True, если все элементы истинны
- **any()** — True if any element is true
True, если хотя бы один элемент истинен
- **isinstance()** — Checks if object is instance of a class
Проверяет, является ли объект экземпляром класса
- **issubclass()** — Checks if class is a subclass
Проверяет, является ли класс подклассом
- **callable()** — Checks if object is callable
Проверяет, можно ли вызвать объект

### 🧰 Object Introspection / Работа с объектами
- **type()** — Returns the type of an object
Возвращает тип объекта
- **dir()** — Returns a list of object attributes
Возвращает список атрибутов объекта
- **getattr()** — Gets an attribute value
Получает значение атрибута
- **setattr()** — Sets an attribute value
Устанавливает значение атрибута
- **hasattr()** — Checks for an attribute
Проверяет наличие атрибута
- **property()** — Defines a property
Создаёт атрибут-свойство
- **super()** — Calls parent class methods
Вызывает методы родительского класса

### ⚙️ Functional Programming / Функциональное программирование
- **map()** — Applies function to all elements
Применяет функцию к элементам
- **filter()** — Filters elements based on condition
Фильтрует элементы по условию
- **reduce()** — Applies function cumulatively
Сводит элементы к одному значению (из functools)
- **lambda** — Creates anonymous function
Создаёт анонимную функцию
- **classmethod()** — Declares a class method
Объявляет метод класса
- **staticmethod()** — Declares a static method
Объявляет статический метод

### 💻 Code Execution / Выполнение кода
- **eval()** — Evaluates a string expression
Выполняет выражение из строки
- **exec()** — Executes Python code
Выполняет строку как код

### 🔡 Unicode and Strings / Юникод и строки
- **chr()** — Returns character from Unicode
Возвращает символ по коду Unicode
- **ord()** — Returns Unicode code for character
Возвращает Unicode-код символа
- **format()** — Formats a string
Форматирует строку

### 🔄 Iterators / Итераторы
- **next()** — Returns next item from iterator
Возвращает следующий элемент итератора
- **iter()** — Returns an iterator
Возвращает итератор

### 🧠 Scope and Variables / Область видимости и переменные
- **locals()** — Returns local variables dictionary
Возвращает словарь локальных переменных

## > This list will be useful for both new and experienced developers!
Этот список пригодится как новичкам, так и опытным разработчикам!