Skip to content

Python code snippet – How to add to the end of an array ?

array = [1 , 2, 3]
print(array)

array.append(4)
print(array)

#[1 ,2 ,3]
#[1 ,2 , 3, 4]
See also  How to make a button disapear on click in Javafx?
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.