I would like to submit a solution for the challenge on the bottom of this page:
If you think that this could be done significaanly easier in python than the python solution above, here is a link to a smaller file on which you can try your code. I will be glad to share the solution on this page.
data = {"Frequencies":[], "Frc consts":[], "IR Inten":[]}
with open("H2O.log") as f:
for line in f.readlines():
for label in data:
if label in line:
data[label].extend(line.split()[-3:])
for line in zip(*data.values()):
print(" ".join(line))
I hope it is a useful comparison to the awk script. Please let me know if you'd like any explanation on how it works.
I would like to submit a solution for the challenge on the bottom of this page:
I hope it is a useful comparison to the
awkscript. Please let me know if you'd like any explanation on how it works.