python - How use regular expressions to compare an input with a set? -
python - How use regular expressions to compare an input with a set? -
i regular look python code to:
1) take input of characters 2) outputs characters in lower case letters 3) compares output in python set.i no @ regular expressions.
why bother?
>>> 'foo'.lower() in set(('foo', 'bar', 'baz')) true >>> 'quux'.lower() in set(('foo', 'bar', 'baz')) false
python regex
Comments
Post a Comment