how to remove empty values in a list in python code example Example: python filter list empty string str_list = list(filter(None, str_list))