filter
This commit is contained in:
parent
064606304a
commit
4ce9f773e7
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -28,7 +28,10 @@ with open(file, 'r') as fp:
|
||||||
prep['U'] = float(prep.pop('A')) / 100
|
prep['U'] = float(prep.pop('A')) / 100
|
||||||
if 'C' in prep:
|
if 'C' in prep:
|
||||||
prep['W'] = float(prep.pop('C')) / 100
|
prep['W'] = float(prep.pop('C')) / 100
|
||||||
result.append([f"{p}{prep[p]}" for p in prep if p in ['X', 'Y', 'Z', 'U', 'V', 'W']])
|
|
||||||
|
filtered_prep = {p:prep[p] for p in prep if p in ['X', 'Y', 'Z', 'U', 'V', 'W']}
|
||||||
|
if(len(filtered_prep.keys())):
|
||||||
|
result.append([f"{p}{filtered_prep[p]}" for p in filtered_prep])
|
||||||
|
|
||||||
with open(f"{file}.result", 'w') as fp:
|
with open(f"{file}.result", 'w') as fp:
|
||||||
fp.write('\n'.join(' '.join(str(i) for i in x) for x in result))
|
fp.write('\n'.join(' '.join(str(i) for i in x) for x in result))
|
Loading…
Reference in New Issue