aboutsummaryrefslogtreecommitdiff
path: root/challenge-117/lubos-kolouch/python/ch-1.py
blob: 7c41429c7d640dede2c5ed499c2c83a087ab799f (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def find_missing_row(filename):
    with open(filename, 'r') as file:
        rows = [int(line.split(',')[0]) for line in file]
    return set(range(1, 16)).difference(rows).pop()


# Test case: assuming the file is named 'file.txt'
print(find_missing_row('file.txt'))  # Should print the missing line number