def get_brand data for brand in brands if re search brand data re retu

1
2
3
4
5
def get_brand(data):
for brand in brands:
if re.search(r'(^| )%s( |$)' % brand, data, re.I):
return brand
return 'NIHUYA'