fork download
  1. file = open('test.txt', 'r')
  2.  
  3. ar = []
  4. n = 30 # 30x30x30
  5.  
  6. for i in range(n):
  7. ar.append([])
  8. for x in range(n):
  9. ar[i].append([])
  10. for z in range(n):
  11. line = file.readline()
  12. if not line:
  13. break
  14. line = str(line).replace(' ', '').replace('\n', '')
  15. ar[i][x].append(float(line))
  16.  
  17. print(ar)
  18. # degenerate)00
Runtime error #stdin #stdout #stderr 0.04s 9240KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'test.txt'