fork download
  1. # your code goes here
  2. def transform_line(line):
  3. lines = []
  4. line = next(osrc)
  5. while line != "":
  6. if line[0].isdigit():
  7. print("O")
  8. line = next(osrc);
  9. lines.append(line)
  10. elif line[0] in {"+", "-"}:
  11. print("U")
  12. line = next(osrc);
  13. lines.append(line)
  14. else:
  15. break;
  16. return lines
  17.  
  18. with open("./testStage1.txt", 'r') as osrc:
  19. osrc.seek(291)
  20. line = next(osrc);
  21. line = next(osrc);
  22. line = next(osrc);
  23. # lines = transform_line(line)
  24. print(line);
Runtime error #stdin #stdout #stderr 0.01s 7892KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 18, in <module>
IOError: [Errno 2] No such file or directory: './testStage1.txt'