Generation

generate functionSun, 13 Nov 2022

iterate over list of keywords, surround them with a quote and concat them with or

def keywords_search_string(keywords): query_str = '' for keyword in keywords: query_str += '"' + keyword + '" OR ' return query_str[:-4] keywords_search_string(['machine learning', 'data science'])

Questions about programming?Chat with your personal AI assistant