きったんの頭

#! /usr/bin/env python3
"""
pe13.py
https://mind.kittttttan.info/py/pe13

pe13.txt
https://mind.kittttttan.info/c/pe13.txt
"""

def pe13(fname="pe13.txt"):
    """
    Work out the first ten digits of the sum of
    the following one-hundred 50-digit numbers.
    """
    with open(fname, 'r') as f:
        nums = f.read()
    nums = nums.split('\n')
    nums = [int(num) for num in nums]
    print(str(sum(nums))[0:10])

if __name__ == "__main__":
    pe13()