i'm just a little confused about the combination of ^ with $. I understand
that it means start and end respectively and then () means extract specifically
what's inside the parenthesis. But why would it print no in this example. please
help with an explanation. thank you
if re.search('^(0|1)$', '0b'):
print 'yes'
else:
print 'no'