fork download
  1. # 遊園地
  2.  
  3.  
  4. #!/usr/bin/env python
  5. #-*-coding:utf-8-*-
  6.  
  7.  
  8.  
  9. l=[i.replace('\n','') for i in open('テキスト.txt', 'r')]
  10. r=['#!/usr/bin/env python','#-*-coding:utf-8-*-']
  11.  
  12.  
  13. for i in l:
  14. open(i,"a")
  15. for n in r:
  16. open(i,"a").write(str(n)+"\n")
  17. open(i,"a").close()
  18.  
Runtime error #stdin #stdout #stderr 0.04s 9324KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 9, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'テキスト.txt'