iK()
What does ik() do?
iK() will get the element at index K of the array/string inside. If no value is inside i0(), it defaults to x. Essentially, i0() == i0(x)
from ArrayExpressions import arrex
lst = [1, 2, 3, 4, 5]
output = arrex.evaluate(lst, "i0() + i1()")
print(output) # 3
Other Important Information:
Input | Any array or string, defaults to x if nothing is provided |
---|---|
Does it create a new scope? | No |
Output | The element at index K |
K | Any number within length of x |
I | The K Value |
Example | i0("Hello") |
Example Explanation | This returns 'H' because H is the first element in the string. |