Lists

append(element, lst)

Append element to the end of lst. Modifies lst.

Parameters:
  • lst (list) – the list to append to

  • element (Any) – the item to append

Return type:

None

join(lst, separator)

Join elements of a list into a single string, separated by a delimiter.

Parameters:
  • lst (list) – the list to join

  • separator (str) – string to separate list elements

Returns:

a joined string of the list elements

Return type:

str

pop(lst, index=None)

Remove and return the element at position index from lst.

Parameters:
  • lst (list) – The list to remove from.

  • index (int, optional) – The list index for the element to remove. If not specified or None, pops last element.

Raises:

IndexErrorindex must exist within lst.

Returns:

The popped element.

Return type:

Any