List: assign by index,listassign,inventory =
List: assign by index,listassign,inventory =
inventory = ['sword', 'armor', 'shield', 'healing potion']inventory[0] = 'crossbow'print inventory
相关内容
- Default Argument Values: default value is evaluated only once,argum
- Define a function in Python,definepython,def hello (w
- File Output,fileoutput,log_file = o
- str Function,strfunction,# The str fu
- Use seek() to move file pointer,seekpointer,f = open('/t
- Define class to deal with files,definedeal,class FileSt
- A tuple with one item: a comma,tuplecomma,# A tuple wi
- File read() Demo,filereaddemo,f = open(r'c
- File writelines(list),filewritelines,f = open(r'c
- Using Lists as Stacks,listsstacks,#To add an i
评论关闭