1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
demolist = [] demolist = ["a", "b", "c"] demolist = [x for x in range(3)]
demolist[idx] = new_item demolist.append(item), demolist.insert(idx, sth) demolist.expand(other_list)
demolist[i]
demolist.pop(), demolist.pop(idx), demolist.remove(item)
len(demolist) demolist.count(item) demolist.index(item, position) demolist[1:-3]
demoarray = array.array("l", range(3)) |--- typecode (must be c, b, B, u, h, H, i, I, l, L, f or d) >>> type(demoarray) <type 'array.array'> list = demoarray.tolist() demoarray.fromlist(demolist)
|