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

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -