Python | LINE!

/ 1 Sept 2013 /
So I wrote this nifty lil piece of code:



with open('speech.txt') as f:
    for i in f:
        i = i.rstrip()
        line = input('line: ')
        if line == 'LINE!':
            print('{}'.format(i.rstrip()))
        elif line != i:
            print('No! {}'.format(i.rstrip()))
print('Good!')


I'm sure this will help me revising for exams or something in the future!!!
 
Copyright © 2010 M(ath)+me, All rights reserved