How is the AND/OR operator represented as in Regular Expressions?

I’m currently programming a vocabulary algorithm that checks if a user has typed in the word correctly. I have the following situation: The correct solution for the word would be “part1, part2”. The user should be able to enter either “part1” (answer 1), “part2” (answer 2) or “part1, part2” (answer 3). I now try to … Read more

How can I obtain the element-wise logical NOT of a pandas Series?

I have a pandas Series object containing boolean values. How can I get a series containing the logical NOT of each value? For example, consider a series containing: True True True False The series I’d like to get would contain: False False False True This seems like it should be reasonably simple, but apparently I’ve … Read more