From 98a5e3c2338242f21f8cbea76e830fcec838fa7f Mon Sep 17 00:00:00 2001 From: ehermakov Date: Mon, 21 Aug 2023 19:54:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B6=D0=B0?= =?UTF-8?q?=D1=8E=20=D0=94=D0=97=20=D0=BF=D0=BE=20=D0=BA=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D1=81=D0=B0=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HNS/Excercises/.DS_Store | Bin 6148 -> 8196 bytes .../.idea/.name | 1 + .../13082023 ДЗ по фигурам JSON/main.py | 10 +++++++--- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 HNS/Excercises/12082023 Найти второй символ в строке/.idea/.name diff --git a/HNS/Excercises/.DS_Store b/HNS/Excercises/.DS_Store index 5794bfea7e0592c33b2ce14383f2f80fe57a57c6..7e583a9ecaf1837b686b5b9e4367241942369baf 100644 GIT binary patch delta 261 zcmZoMXmOBWU|?W$DortDU;r^WfEYvza8E20o2aMA$gweCH}hr%jz7$c**Q2SHn1>q zZ02EUWU^IfFk~=dFkr9%lST~23<@l=ECwtV%xo-9EEYhX5shq z6t!cqp8Sbr@?=+bHwsNrVN=}P%T~p>v7v`akQwM~Aduh&60RU0Y!>AB&ODi4#B;Jg c4+jS$#B&Uj<9Vh}?qxHde2Cq3V?!qs00fFFAOHXW delta 105 zcmZp1XfcprU|?W$DortDU=RQ@Ie-{Mvv5r;6q~50$jG)aU^g=(+h!htMyAb-B2|ow q**Q1_nSn}xK!6)axPnw~Ed0(qnP0{eq?dsSVh+e?hRyLjbC>~WbPv1$ diff --git a/HNS/Excercises/12082023 Найти второй символ в строке/.idea/.name b/HNS/Excercises/12082023 Найти второй символ в строке/.idea/.name new file mode 100644 index 0000000..11a5d8e --- /dev/null +++ b/HNS/Excercises/12082023 Найти второй символ в строке/.idea/.name @@ -0,0 +1 @@ +main.py \ No newline at end of file diff --git a/HNS/Excercises/13082023 ДЗ по фигурам JSON/main.py b/HNS/Excercises/13082023 ДЗ по фигурам JSON/main.py index f68d289..8169392 100755 --- a/HNS/Excercises/13082023 ДЗ по фигурам JSON/main.py +++ b/HNS/Excercises/13082023 ДЗ по фигурам JSON/main.py @@ -2,9 +2,13 @@ import json def json_to_python(): - with open("shapes.json") as shapes: - data = json.load(shapes) - return data + with open("shapes.json") as lines: + data = json.load(lines) + for shape in data["shapes"]: + print("Type:", shape["type"]) + print("Color:", shape["color"]) + print() + return True print(json_to_python())