def file_input(): f = open("problem59.txt", 'r') numbers = list() for i in f: numbers.append(i.split(",")) numbers = flatten(numbers) numbers = [int(x) for x in numbers] return numbers
def create_cntfrac(fraction): new_frac = [[fraction[0]]] for i in repeat(fraction[1:], 200 / len(fraction[1:])): new_frac.append(i) new_frac = flatten(new_frac) return new_frac