python else if and equality test

Home / Uncategorized / python else if and equality test

I cannot figure out in python language why the following code shows an error.

The two codes both show an error, for me, them really do the same function.
else if(sentenceSplitted[0] == ‘What’):Next is different way for the same "function".
else if(sentenceSplitted[-1] == ‘?’):

Python has no else if. You should use elif.
Read more

Leave a Reply

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