First enter the python editor interface!
Write a comment about this program!
Related recommendations: "Python Video Tutorial"
Create a students variable to store the names of students!
Then insert an element into the array through the append function!
Finally print out this array!
Select the run command "run"->"run".
Finally run the program and find that the new element has been successfully inserted!
The above is the detailed content of How to add elements to an array in python. For more information, please follow other related articles on the PHP Chinese website!