python remove \n form list

    converted_list.append(element.strip())

Here is what the above code is Doing:
1. We create an empty list called converted_list.
2. We loop through the list of strings in the list called list_of_strings.
3. For each string in the list, we strip the whitespace from the string and add it to the converted_list.
4. We print the converted_list.