3 ms·
Python is relatively consistent with regards to appending/popping/inserting/removing: a=[] dir(a) 'append', 'count', 'extend', 'index', 'insert', 'pop', 'remov
by ghshephard 17y ago
Python is relatively consistent with regards to appending/popping/inserting/removing:
a=[]
dir(a)
'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort'
help(a.remove)
remove(...)
L.remove(value) -- remove first occurrence of value
help(a.pop)
pop(...)
L.pop([index]) -> item -- remove and return item at index (default last)
append(...)
L.append(object) -- append object to end
insert(...)
L.insert(index, object) -- insert object before index