clean_dict = {str(key).strip(): re.sub(r"[^a-zA-Z0-9 ]", "", str(item)) for key, item in response.items()} print(clean_dict)