Question: here is my professor answer key but is not work python code: fileName = input(Enter file name and path: ) fhand = open(fileName) ct =0

here is my professor answer key but is not work

python code:

fileName = input("Enter file name and path: ")

fhand = open(fileName)

ct =0

for line in fhand:

line = line.strip()

if line.startswith('From:'):

s, email=line.split()

print(email)

ct += 1

print ("There were" , ct , "lines in the file with From as the first word.")

Error message is

Traceback (most recent call last): File "J:/python/sg2/From.py", line 7, in s, email=line.split() ValueError: too many values to unpack (expected 2)

my lord file is txt message

From: stephen.marquard@uct.ac.za Sat-Jan-5-09:14:16-2008 Message line 1 Message line 2 Message line N From: k.jorden@uci.edu Tue-Dec-12-15:10:11-2011 Message line 1 From: joe@mail.com Mon-Feb-8-10:22:00-2009

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!