What do `sort`, `reverse`, `slice`, `range`, `min` and `max` do?
IntermediateConceptLoops, Conditionals, Dynamic Blocks and Functions
Answer
sort orders strings, reverse reverses a list, slice(list, start, end) takes a sub-list, range(n) generates 0..n-1 (handy to build counts of names), min and max take numbers as separate arguments, so pass a list with the expansion symbol: max(var.sizes...). There is no built-in sum; use a for expression with a local or length-based arithmetic where you can.
More on Loops, Conditionals, Dynamic Blocks and Functions
How does `count` work?BeginnerHow does `for_each` work?BeginnerWhen should you choose `for_each` over `count`?IntermediateHow do you use `for_each` with a list of objects?IntermediateWhat does "The for_each value depends on resource attributes that cannot be determined until apply" mean?AdvancedHow do you create a resource conditionally?Beginner