Append element to a list : List Append « List « Python
- Python
- List
- List Append
Append element to a list

scores = ["1","2","3"]
# add a score
score = int(raw_input("What score did you get?: "))
scores.append(score)
# list high-score table
for score in scores:
print score
Related examples in the same category