In Python, I want to count the number of lines in a file xh-2.txt ... Use subprocess. check_output().
stackoverflow.com