Difference between revisions of "Talk:List"

From MiniScript Wiki
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:
What is the purpose of having a separate "List methods" page?
 
  
Is that really needed or could the be also listed here?
+
Things to illustrate:
  
--[[User:SebNozzi|SebNozzi]] ([[User talk:SebNozzi|talk]]) 16:40, 5 December 2021 (UTC)
+
* 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