Append element to a list,appendelement,scores = ['1
Append element to a list,appendelement,scores = ['1
scores = ['1','2','3']# add a scorescore = int(raw_input('What score did you get?: '))scores.append(score)# list high-score tablefor score in scores: print score
- Empety list multiply,empetymultiply,L = [None] *
- Negative List Indices,negativeindices,li = ['a', '
- Get length of a list,getlength,print len([1
- Delete an element from a list,deleteelement,scores = [
- List repetition,listrepetition,print ['Ni!'
- A list of lists: nested list,listsnested,words = 'The
热门文章:
相关内容
- Empety list multiply,empetymultiply,L = [None] *
- Negative List Indices,negativeindices,li = ['a', '
- Get length of a list,getlength,print len([1
- Delete an element from a list,deleteelement,scores = ['1
- List repetition,listrepetition,print ['Ni!'
- A list of lists: nested list,listsnested,words = 'The
- Use Print to display tuples,displaytuples,chest = ('go
- in function for a string and a tuple,functiontuple,S, T = 'lumb
- Iterate over a string and tuple,iteratetuple,S = 'lumberj
- Create a tuple with some items and display with a for loop,tupleite
评论关闭