From a581f08c6cc93c672c91b5c648610f058eaaf9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9=20=D0=92=D0=B0?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=82=D0=B8=D0=BD=D0=BE=D0=B2=D0=B8=D1=87=20?= =?UTF-8?q?=D0=96=D0=B5=D0=B1=D1=80=D0=B8=D0=BA=D0=BE=D0=B2?= Date: Wed, 24 Apr 2024 10:49:54 +0900 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20less2.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- less2.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 less2.md diff --git a/less2.md b/less2.md new file mode 100644 index 0000000..f6bf095 --- /dev/null +++ b/less2.md @@ -0,0 +1,36 @@ +Ссылка на урок: https://youtu.be/XnWORRJVDfw?si=jsBtVj0EW-UPk3qM + +List (Списки, похожи на массивы в 1С) +price = [75, 80, 15, 41]print(type(price), price) +print(price[0], price[1]) +price.append(23) +print(price) +price.insert(0, 8) +print(price) +del price[0]print(price) +price.remove(15) +print(price) +print(80 in price) +print(max(price)) +print(min(price)) + +price.append("строка") +print(price) + +Tuple, кортеж, не изменяемый список +price = (75, 80, 15, 41) +del price[0] + +Dict (словарь, ассоциативный список, похож на соответствие в 1С) +products = {} +products["стул"] = 100 +products["стол"] = 200 +print(products) + +Set, множества - "контейнер", содержащий не повторяющиеся элементы +price_1 = set([75, 80, 15, 41]) +price_2 = {80, 2, 10} +price_3 = price_1 | price_2 +price_4 = price_1 & price_2 +print(price_3) +print(price_4) \ No newline at end of file