Get number of lines in file

ssmith579 at aol.com ssmith579 at aol.com
Fri May 27 15:17:08 EDT 2005


I have read in a file and need to get the number of lines.

    cpn_file = open('Central Part number list.txt')
    cpn_version = cpn_file.read().split('\n')

I want to know the number of elements in cpn_version.




More information about the Python-list mailing list