valos_halozat_hf/format_file.py

9 lines
282 B
Python
Raw Permalink Normal View History

2020-10-02 00:18:14 +02:00
#!/usr/bin/env python3
with open('valos_halozat.txt') as halozat:
halozat.readline()
sorok=int(halozat.readline())
for _ in range(sorok):
hal = halozat.readline()
print(f"{list(filter(None, hal.split(' ')))[0]} {list(filter(None, hal.split(' ')))[1]}")