hnc-eduard/HNS/Excercises/13082023 ДЗ по фигурам JSON/main.py

15 lines
276 B
Python
Raw Normal View History

2023-08-18 19:27:51 +02:00
import json
def json_to_python():
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
2023-08-18 19:27:51 +02:00
print(json_to_python())