Welcome To FMan documentation
Array - A multi-function datatype.
To use array you need to import it.
1.1 - Array Copy
from fman.dataset import Array array = Array(1, 2, 'three', "four", '5', "6", "etc.")
Now you have access to all array methods. You can use this methods:
- insert()
- peek()
- remove()
- clear()
- find()
- count()
- sort()
- reverse()
- len()
- slice()
- q()
- typecase()
push()
To add a item to array use this method.
1.2 - push() Copy
from fman.dataset import Array array = Array(1, 2, 'three', "four", '5', "6", "etc.") array.push("new_item") print(array)
Output:
<1, 2, 'three' , 'four' , '5' , '6' , 'etc.' , 'new_item'>
pop()
To remove a item from end in array use this method.
1.2 - pop() Copy
from fman.dataset import Array array = Array(1, 2, 'three', "four", '5', "6", "etc.", "new_item") array.pop() print(array)
Output:
<1, 2, 'three' , 'four' , '5' , '6' , 'etc.'>