代码:
def find(string_list, search):
new_list = []
for i in string_list:
if search in i:
new_list.append(i)
print(new_list)
print(find(['she', 'sells', 'sea', 'shells', 'on', 'the', 'sea-shore'], 'he'))
回报:
['she', 'shells', 'the']
None