I tried to used 'in' function to check some value available in a list or not. But it does not work correctly.
from nltk.tokenize import word_tokenize
x ='what are bad'
a= word_tokenize(x)[0]
qestion = ['what,why,how,are,am,should']
if a in qestion:
print 'question'
else:
print 'not a question'
I couldn't find the reason for that. Can any one help me to solve this.
['what,why,how,are,am,should']does what you want: that's a list with only 1 element in it