Re: [Tutor] Mailbox

2015-07-30 Thread Cameron Simpson
On 30Jul2015 19:00, ltc.hots...@gmail.com wrote: New revision code: count = 0 fn = raw_input("Enter file name: ") if len(fn) < 1 : fname = "mbox-short.txt" for line in fn: if 'From' in line.split()[0]: count += 1 print "There are %d lines starting with From" % count print len(line) fn = open(f

Re: [Tutor] Mailbox

2015-07-30 Thread ltc.hotspot
Hi Cameron, New revision code: count = 0 fn = raw_input("Enter file name: ") if len(fn) < 1 : fname = "mbox-short.txt" for line in fn: if 'From' in line.split()[0]: count += 1 print "There are %d lines starting with From" % count print len(line) fn = open(fname) print "There were", count, "lin