Feb-16-2024, 07:43 PM
i have a stock market app that im building. basically i have the following code that works as a feature that allows the user to search for official company name and its corresponding symbol in order to view news about the company or view the last few days's stock market value
search_results=[data["name"] for data in DATA_DICT if search_term in data["name"].lower()]i would like to sort these results by similarity so for instance if the input was spam and the company names were ham,spam, spammy it would sort the list as spam, spammy, ham