Writing a list to a file with Python,"for item in thelist: