Must: Python Schreiben Sie Array in Datei (Werte als separate Zeilen)
# define list of places
places = ['Berlin', 'Cape Town', 'Sydney', 'Moscow']
with open('listfile.txt', 'w') as filehandle:
for listitem in places:
filehandle.write('%s\n' % listitem)
Determined Dunlin