Append any value to the array using append method
suggest changemy_array = array('i', [1,2,3,4,5])
my_array.append(6)
# array('i', [1, 2, 3, 4, 5, 6])
Note that the value 6
was appended to the existing array values.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents