adventofcode/2021/5/template.py

14 lines
340 B
Python
Raw Normal View History

2022-12-01 21:13:55 +01:00
#!/usr/bin/env python3
import re
def main():
content = open('input', 'r').readlines()
content = list(map(str.strip, content))
for line in content:
m = re.match('^(\d+),(\d+) -> (\d+),(\d+)')
x1, y1, x2, y2 = m.groups(1)
print(f'going from {x1},{y2} to {x2},{y2}')
if __name__ == "__main__":
main()