I have two list:
main_list = [\'Smith\', \'Smith\', \'Roger\', \'Roger-Smith\', \'42\'] master_list = [\'Smith\', \'Roger\']
I want to coun
What about this
main_list = ['Smith', 'Smith', 'Roger', 'Roger-Smith', '42'] master_list = ['Smith', 'Roger'] print len([word for word in main_list if any(mw in word for mw in master_list)])