KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I know that the and and or expressions exist in python, but is there any and/or expression? Or some way to combine them in order to produce the same effect as a and/or expression? my code looks something like this: if input=="a": if "a" or "á" or "à" or "ã" or "â" in someList: someList.remove("a") or someList.remove("á") or someList.remove("à") or someList.remove("ã") or someList.remove("â") with this, I mean that if the user inputs "a" and any type of "a" is included in a previously defined list, can I have all the types of "a" removed from a given list? python tells me that there is a problem in: someList.remove("a") or someList.remove("á") or someList.remove("à") or someList.remove("ã") or someList.remove("â") he tells me: ValueError: list.remove(x): x not in list
Tags (comma-separated)
Save Edits
Cancel