17 lines
312 B
Python
17 lines
312 B
Python
import json
|
|
|
|
h = []
|
|
|
|
|
|
with open("curva.txt", "r") as f:
|
|
for linea in f:
|
|
if "HValue" in linea:
|
|
partes = linea.strip().split("=")
|
|
h_val = float(partes[1])
|
|
h.append(h_val)
|
|
|
|
|
|
print(h)
|
|
|
|
with open("h_values.json", "w") as json_file:
|
|
json.dump(h, json_file, indent=4) |