import nltk
import random
from nltk.tokenize import sent_tokenize, word_tokenizefile = open("sms.txt", "r")
for line in file:#print linea=word_tokenize(line)if a[5] == 'SBI' and a[6]== 'Debit':print a[13]
Could any one please help me in rectifying the error. The programme runs for a few lines then stops and gives an index out of range error. I understand the error but I dont know how to fix it. I want to basically remove the lines which have are not readable.