vendor = ' AFL TELECOMMUNICATIONS '
' AFL TELECOM*' in vendor
Running this code gives FALSE when I expected it to give TRUE. It seems that the 'in' clause is not seeing the asterix '*' as wild card. Any suggestions how to make this work? Thanks!
vendor = ' AFL TELECOMMUNICATIONS '
' AFL TELECOM*' in vendor
Running this code gives FALSE when I expected it to give TRUE. It seems that the 'in' clause is not seeing the asterix '*' as wild card. Any suggestions how to make this work? Thanks!
You're gonna want to use a regular expression instead.
import re
vendor = 'AFL TELECOMMUNICATIONS'
if re.search('AFL TELECOM.*', vendor):
print("Match")
else:
print("No Match")