fork download
  1. number = 0
  2. for i in range(1,101):
  3. fname = str(i) + ".txt"
  4. with open(fname,mode='w') as f:
  5. for j in range(1,101):
  6. number += 1
  7. f.write(str(number)+'\n')
  8.  
  9.  
Runtime error #stdin #stdout #stderr 0.16s 23656KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 4, in <module>
    with open(fname,mode='w') as f:
PermissionError: [Errno 13] Permission denied: '1.txt'