.del and .remove


#1

Isn't the .del() method basically the same as .remove()?


#2

.del() isn't something? its:

del aList[index]

and no, because del removes based on index, where as .remove() removes based on item in the list:

aList = ["a", "b", "c", "d", "e"]
del aList[0]
aList.remove("e")

#3

Okay, Gotcha! Thanks!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.