d = [
['Name', 'PH', 'H1', 'H1', 'H2', 'H2', 'H3', 'H3', 'H4', 'H4', 'H5', 'H5', 'H6', 'H6'],
['COVID-19', 0.1, 0.9, 0.2, 0.7, 0.1, 0.8, 0.1, 0.5, 0.15, 0.9, 0.5, 0.2, 0.1],
['Flu', 0.2, 0.2, 0.3, 0.6, 0.14, 0.45, 0.6, 0.8, 0.15, 0.4, 0.7, 0.2, 0.76],
['SARS', 0.4, 0.8, 0.2, 0.75, 0.5, 0.9, 0.2, 0.6, 0.1, 0.85, 0.15, 0.4, 0.05],
['Angina', 0.05, 0.1, 0.5, 0.1, 0.7, 0.2, 0.6, 0.15, 0.73, 0.18, 0.25, 0.1, 0.05]
]
z = []
h1 = []
h2 = []
h3 = []
h4 = []
h5 = []
h6 = []
maxh = []
for i in range(1, len(d)):
for j in range(2, len(d[i]), 2):
pp = round(abs(d[i][j] - d[i][j + 1]), 3)
z.append(pp)
print("Все цены свидетельств", z)
for i in range(0, len(z), 6):
h1.append(z[i])
h2.append(z[i + 1])
h3.append(z[i + 2])
h4.append(z[i + 3])
h5.append(z[i + 4])
h6.append(z[i + 5])
maxh.append(max(h1))
maxh.append(max(h2))
maxh.append(max(h3))
maxh.append(max(h4))
maxh.append(max(h5))
maxh.append(max(h6))
print("Максимальные цены свидетельств для каждого свидетельства", maxh)