#!/usr/bin/env python3 from pprint import pprint import sys, time DIR = 'data' def test(t): fname = f'{DIR}/{t}.txt' r = [] try: with open(fname, 'r') as f: for l in f: r.append(l.strip()) return r except FileNotFoundError: return None for x in range(0, 183): te = test(x) if(te != None): word = te print(f"{x:03d} = '{word}'")