how to join a string by new line out of a list python

var = '\n'.join(myList)

Here is what the above code is Doing:
1. We create a list called myList.
2. We add a bunch of strings to myList.
3. We use the ‘\n’ character to add a newline after each string.
4. We use the ”.join() method to join all the strings in myList into a single string.
5. We assign this string to the my_var variable.