I'm working on a small piece of translation software in its early stages. I'm trying to take the end character of a word and do something with it, but I need to differentiate between different cases.
How can I use if endswith("a" or "b" or "c") : doAThing
?
I've tried ||
, |=
, and or
.
if word.endswith("a" , "e" , "i" , "o" , "u") : print("JEFF")
Error:
File "test.py", line 50, in <module>
if word.endswith("a" , "e" , "i" , "o" , "u") and not ("a" , "e" , "i" , "o" , "u"): print("JEFF")
TypeError: endswith() takes at most 3 arguments (5 given)