Need Help!]
def main(): pass if __name__ == '__main__': main() postPos=words[3] f = open ("c:/users/terry/downloads/tup1012k/tup1012x.drf","r") lines = f.readlines() for line in lines: words = line.split(",") print (words[3],postPos) close = f When I run the above script, the field postPos doesn't match the input! postPost should be the same as words[3] can't guess why? any help? *** Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32. *** >>> 1 3 2 3 3 3 >>> Terry Green
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor