Difference between revisions of "Talk:List"

From MiniScript Wiki
Jump to navigation Jump to search
(Cleaned up - added things to illustrate)
(Add slicing)
 
Line 8: Line 8:
 
* finding the index of an element
 
* finding the index of an element
 
* removing elements (by INDEX!)
 
* removing elements (by INDEX!)
 +
* slicing! (also, using list[:] to create a copy of the list)
 
* sorting
 
* sorting
 
* shuffling
 
* shuffling

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