Using Python regular expressions how can you get a True/False returned? All Python returns is:
True
False
<_sre.SRE_Match object at ...>
Here is my method:
import re # Compile p = re.compile(r'hi') # Match and print print bool(p.match("abcdefghijkl"))