Qurak

PositionIndex

Disponibile

Returns an association mapping each element to the list of its positions.

PositionIndex[list]
PositionIndex[assoc]
PositionIndex[{a, b, a, c, b}] → <|a -> {1, 3}, b -> {2, 5}, c -> {4}|>PositionIndex[<|1 -> a, 2 -> b, 3 -> c, 4 -> d, 5 -> c, 6 -> a|>] → <|a -> {1, 6}, b -> {2}, c -> {3, 5}, d -> {4}|>

Argomenti

Correlate

Tutte le 6300 funzioni · Usa questo da un client MCP