Files
norgeskyst/convert.py
Radovan Bast debb82cae3 saving Norgeskyst.txt
we might want to move it somewhere else than a Git repo
2022-07-16 19:32:15 +02:00

16 lines
309 B
Python

import sys
with open(sys.argv[-1], "r") as f:
_ = next(f)
_ = next(f)
while True:
try:
line = next(f)
except StopIteration:
break
n = int(line.split()[0])
print(f"polygon {n}")
for _ in range(n):
print(next(f).strip())