Building and Growing a List
Append, index, and iterate a List.
Why a List?
When you need an ordered, growable group of values, reach for a List. It holds items in sequence and can stretch as you add. 📋
A Typed Container
A Mojo List is typed: every element shares one type, like List[Int]. That uniformity is what makes it fast.
var nums = List[Int]()All lessons in this course
- Building and Growing a List
- Key-Value Data with Dict
- Unique Items with Set
- Choosing the Right Collection