Your reaction?
Angry Angry
0
Angry
Cute Cute
0
Cute
Fail Fail
0
Fail
Geeky Geeky
0
Geeky
Lol Lol
0
Lol
Love Love
0
Love
OMG OMG
0
OMG
Win Win
0
Win
WTF WTF
0
WTF

Python for Informatics – Chapter 8 – Lists

Comments 9

  1. # why isnt this working? it works if i have line[0]='F', but it wont allow me to be more specific with line[0:3]. why not?
    code>>
    file=open('mbox-short.txt','r')
    print 'works'
    for line in file:
     if line[0:3]=='From':
      print line
     else: 
      continue 

Leave a Reply

Your email address will not be published. Required fields are marked *

log in

Become a part of our community!

reset password

Back to
log in