November 7th, 2012, 10:08 PM
*Number of Names*
assume that a file containing a series of names (as strings) is named names.txt and exists on the computer's disk. Write a program that displays the number of names that are stored in the file. (Hint: Open the file and read every string stored in it. Use a Variable to keep a count of the number of items that are read from the file.)
November 7th, 2012, 11:15 PM
print(os.popen('wc -l names.txt','r').read())
[/code] are essential for python code and Makefiles!