Skip to content

Slices

Like Python's slices.

They are used to access multiple elements of lists and strings. However, slice assignment is not supported.

Declaration

Same as Python

def pseudo_fn():
    a: slice = slice(10, 2, -3)

Slice attributes and methods

The slice attributes (start, stop, step) and method (indices()) are not supported.

Other operations

  • print()