Code: Alles auswählen
import pickle
def anlegen(charts):
interpret=raw_input("Interpret: ")
while interpret:
titel=raw_input("Titel: ")
stmmnzhl=input("Stimmenzahl: ")
hit=[interpret,titel,stmmnzhl]
charts.append(hit)
print " "
interpret=raw_input("Interpret: ")
def speichern(charts):
hitlist=file("Charts.txt","w")
pickle.dump(charts,hitlist)
hitlist.close()
def ausgeben(charts):
for hit in charts:
print hit