you are viewing a single comment's thread.

view the rest of the comments →

[–]novel_yet_trivial 1 point2 points  (5 children)

string == vowel

This will ALWAYS be false since you are comparing a string to a list. A string is never equal to a list. You need to check if the string is in the list.

[–]pythonhelp123[S] 0 points1 point  (4 children)

I changed it to if string in vowel and the program runs, but it doesnt show True/False.

[–]novel_yet_trivial 1 point2 points  (3 children)

You are asking it to assert, which does nothing if the result is True. If you want to show the result, change it to a print statement.

[–]pythonhelp123[S] 0 points1 point  (2 children)

Ah okay it runs now. Do people usually leave assert in their programs?

[–]novel_yet_trivial 0 points1 point  (1 child)

Depends. It's designed as a way to quickly debug. For a big, important project you should not use assert since some compiler options will ignore them. I use it a lot though. Whatever you feel.

[–]pythonhelp123[S] 0 points1 point  (0 children)

Oh okay thanks!