Element - i
- Index
Characters:
i
Description
Index into a list
Overloads
any-num
-a[b] (index)
num-any
-b[a] (index)
str-str
-enclose b in a (b[0:len(b)//2] + a + b[len(b)//2:])
any-[x]
-a[:b] (0 to bth item of a)
any-[x,y]
-a[x:y] (x to yth item of a)
any-[x,y,m]
-a[x:y:m] (x to yth item of a, taking every mth)
Examples
`abc` ⟨1|2⟩ i
=`b`
`abc` 3 i
=`a`
⟨1|2|3⟩ ⟨4|9⟩ i
=⟨2|3|1|2|3⟩
`joemama` `biden's` i
=`joebiden'smama`
⟨1|2|3⟩ 0 i
=1
⟨1|2|3⟩ -1 i
=3
⟨1|2|3⟩ -0.1 i
=1
⟨1|2|3⟩ 1.9 i
=2
⟨2|3|4|5⟩ ⟨2⟩ i
=⟨2|3⟩
⟨1|3|5|7⟩ ⟨1|3⟩ i
=⟨3|5⟩
4 ⟨1|3|4⟩ i
=3
⟨1|2|3|4|5|6|7|8|9|10⟩ ⟨1|8|2⟩ i
=⟨2|4|6|8⟩