0

How many arguments does the insert method takes at a time?

31st Jul 2017, 6:40 AM
Ritwik Tripathi
Ritwik Tripathi - avatar
2 ответов
+ 8
Two - the index and the object to be inserted there. That moves all elements "to the right" by +1 position in the index count.
31st Jul 2017, 6:42 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 3
https://docs.python.org/3/tutorial/datastructures.html Most languages have some online documentation, and it's good to get used to using them - it's impossible to remember all the methods you need! There's also an append(x) method if you want to just add something to a list
31st Jul 2017, 6:44 AM
Dan Walker
Dan Walker - avatar