fork download
  1. from collections import Counter
  2.  
  3. with open("newsafr.txt", "r", encoding= "utf-8") as f:
  4. array = [line.strip().split() for line in f]
  5. data = []
  6. for i in range(len(array)):
  7. for j in range(len(array[i])):
  8. if len(array[i][j]) > 6:
  9. data.append(array[i][j])
  10. p = Counter(data)
  11. # for count in range(11):
  12. # print(p.keys())
  13.  
  14.  
Runtime error #stdin #stdout #stderr 0.01s 27616KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 3, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'newsafr.txt'