11 lines
198 B
Text
11 lines
198 B
Text
# create an array with one string in it
|
|
a = ['foo']
|
|
|
|
# add items
|
|
a + 1 # ["foo", 1]
|
|
|
|
# set the value at a specific index in the array
|
|
a[1] = 2 # [2, 1]
|
|
|
|
# retrieve an element
|
|
see a[1]
|