I am trying to count the number of lines in a file using Python functions. Within the current directory, while os.system(\"ls\") finds the file, the command
The error occurs because you are trying to run a command named wc -l sorted_list.dat, that is, it is trying to find a file named like "/usr/bin/wc -l sorted dat".