String fails to match by and or, in search. Why?
string = 'This is some text with an email add: myusername@domain.com'
a = re.findall('[\w]+@[\w]+\.[\w]{3}',string)
b = string.split(' ')
print (a)
print (b)
if a==b:
# also tried: if a in b:
print(a, ' yes it is found')
else:
print('not !?!?!')
['myusername@domain.com']
['This', 'is', 'some', 'text', 'with', 'an', 'email', 'add:', 'myusername@domain.com']
not !?!?!