Data Structures - Sequence


This post includes notes on linear data structures.

List and C,R,U,D of list

List has values in sequence. Implicitly, it also has length (or size) for list and indices (for elements) properties. In brief, val = list [index] and length = len(list).

  • C: Creating

Creating a list by initializer a = []

  • R: Read: get val from index, get length of list, or, get index from val

Index => val

pop() removes and returns the last item in the list.

Random fetch

  • U: Update:

  • set value




results matching ""

    No results matching ""