dataTest.py 424 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env python3
  2. from pprint import pprint
  3. import sys, time
  4. DIR = 'data'
  5. def test(t):
  6. fname = f'{DIR}/{t}.txt'
  7. r = []
  8. try:
  9. with open(fname, 'r') as f:
  10. for l in f:
  11. r.append(l.strip())
  12. return r
  13. except FileNotFoundError:
  14. return None
  15. for x in range(0, 183):
  16. te = test(x)
  17. if(te != None):
  18. word = te
  19. print(f"{x:03d} = '{word}'")