Difference between revisions of "Talk:List"
Jump to navigation
Jump to search
(Added question to discussion) |
(Add slicing) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | + | Things to illustrate: | |
− | + | * empty list | |
+ | * getting length of list | ||
+ | * referencing elements (by index) | ||
+ | * adding elements (push) | ||
+ | * finding the index of an element | ||
+ | * removing elements (by INDEX!) | ||
+ | * slicing! (also, using list[:] to create a copy of the list) | ||
+ | * sorting | ||
+ | * shuffling | ||
+ | * joining elements | ||
+ | * pop / pull (remove last and return / remove first and return) | ||
+ | * sum | ||
+ | * ranges |
Latest revision as of 15:52, 6 December 2021
Things to illustrate:
- empty list
- getting length of list
- referencing elements (by index)
- adding elements (push)
- finding the index of an element
- removing elements (by INDEX!)
- slicing! (also, using list[:] to create a copy of the list)
- sorting
- shuffling
- joining elements
- pop / pull (remove last and return / remove first and return)
- sum
- ranges