A tuple is not modified once created ; if you have a C programming background, then you can think of a tuple as an array of constant ; while a list is modifiable so it can be assigned new elements ot get its elements deleted .
Many functions return tuples as a return value , so that the caller for these functions wouldn't modify the result .
A list is just analogous to an array : It's indexes are numeric ( 0,1,2, ...).
You can think of a dictionary as a list whose indexes can be anything non numerical as long as these indexes are unmodifiable ( strings, tuples, numbers )
BTW, I answered ur other question regarding the countLines(), but seems that Yahoo Answers doesn't retain the indentation , which is essential for Python. So I am sending the same source BUT substitute EACH occurrence of the '@' symbol below with a space so that you get the correct logical indentation for the program to run :P
import sys # for exit()
def countLines() :
@n=0 # to hold the number of lines
@try :
@@f = open ("somefile.txt") // use correct file name and path
@@for line in f :
@@@n = n +1
@@return n
@except :
@@print "File error. The program will end "
@@sys.exit()
numberofLines = countLines()
print 'The file ',numberofLines,'lines'
raw_input()