Обновить less4.md

This commit is contained in:
parent a1e95b5f63
commit 57093d3f49
1 changed files with 10 additions and 4 deletions

View File

@ -27,8 +27,10 @@ def say_return(world_1, world_2):
res = say_return("Привет ", "мир")
print(res)
```
Распаковка функций в python
### Распаковка функций в python ###
```python
# Распаковка
# Функция ПолучитьТоварСЦеной()
# Возврат Новый Структура("Товар, Цена", "Стол", 1300);
@ -41,7 +43,6 @@ def get_price():
price_1 = 1300
return product_1, price_1
product, price = get_price()
print(product, price)
@ -49,8 +50,10 @@ print(product, price)
print(say_hello_world.__doc__)
help(say_hello_world)
```
Проверка типов в python
### Проверка типов в python ###
```python
def subtraction(num_1, num_2):
"""
Функция isinstance() создана для проверки принадлежности данных определенному классу (типу данных)
@ -79,3 +82,6 @@ def dirty(my_list):
print(price)
dirty(price)
print(price)
```
[Назад на главную](readme.md)