From 04ad8bddc1726e267c37dd0655caf2c45759b8ff Mon Sep 17 00:00:00 2001 From: EfremovSI Date: Sun, 21 Sep 2025 22:07:04 +0300 Subject: [PATCH] =?UTF-8?q?report:=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TEMA2/report.md | 14 +++++--------- TEMA3/report.md | 3 ++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/TEMA2/report.md b/TEMA2/report.md index f36d607..8b9694e 100644 --- a/TEMA2/report.md +++ b/TEMA2/report.md @@ -646,16 +646,12 @@ dic5 ``` ```py -tupl3 = ('N', 'I', 'G', 'G', 'E', 'R') -s = 's' -tupl3 = tupl3 + (s,) -tupl3 -('N', 'I', 'G', 'G', 'E', 'R', 's') -l1st = ['R', 'U', 'S', 'I', 'A'] - -dict227 = dict(zip(l1st, tupl3)) +tupl3 = ('A', 'B', 'C', 'D', 'E', 'F','G') +l1st = ['1', '2', '3', '4', '5'] + +dict227 = dict(zip(tupl3,l1st)) dict227 -{'R': 'N', 'U': 'I', 'S': 'G', 'I': 'G', 'A': 'E'} +{'A': '1', 'B': '2', 'C': '3', 'D': '4', 'E': '5'} len(dict227) 5 - элеменов получится пять, ведь команда zip работала столько раз, сколько элементов в наиболее маленьком объекте ``` diff --git a/TEMA3/report.md b/TEMA3/report.md index 4e1d584..aa7a295 100644 --- a/TEMA3/report.md +++ b/TEMA3/report.md @@ -537,9 +537,10 @@ False ## 9. Методы. Просмотрим список всех атрибутов объекта: - +```py >>> stroka='Микропроцессорная система управления';dir(stroka) ['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'removeprefix', 'removesuffix', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill'] +``` ### 9.1. Методы в строках.