Qurak

Get elements of a list

Workflow 5 steps, run in order in one session. Every step was executed against the engine and the output below is what it produced.

Step 1
squares = Range[10] ^ 2
Output
{1, 4, 9, 16, 25, 36, 49, 64, 81, 100}
Step 2
Part[squares, 3]
Output
9
Step 3
squares[[1 ;; 5]]
Output
{1, 4, 9, 16, 25}
Step 4
Take[squares, {5, 8}]
Output
{25, 36, 49, 64}
Step 5
squares[[-7 ;; ]]
Output
{16, 25, 36, 49, 64, 81, 100}

Functions used

Related recipes

All recipes · Function reference · Use this from an MCP client