r/learnpython • u/teuniedekkah • 12d ago
adding 1 to a array
so i want to add 1 extra thing to an array like i have test = [0,0] i want to do print(test[2]) so how do i add the test[2] to the array without just adding it at the begining of the script (fixed)
0
Upvotes
View all comments
Show parent comment
1
u/LayotFctor 12d ago
Also install an LSP in your IDE. If I type a dot after my list variable, append is suggested among a whole list of applicable methods. Sometimes, it even prints method documentation and examples too.