Skip to content

lindex

Returns a list element by index.

Syntax

tcl
lindex list index

Parameters

  • list: The list to index into
  • index: The index of the element to return (0-based, or negative from end)

Examples

Basic indexing

Output

Negative indices

Output

Out of bounds

Output

See Also