Python list 'in' statement doesn't work correctly

Viewed 53

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.

1 Answers
Related