# How can I select a part of a table? [closed]

I have a table, for example given by Table[{{1,8},{3,9},{5,10},{6,30},{10,70}}]. How can I select a part of this table so that the result takes the form {{5,10},{6,30}}?. I will be really thankful if someone help.

• Table is used to construct tables via iteration. I think what you are looking for is a list, which you have already constructed inside your syntactically incorrect Table function call. Then you can use MMA's standard Part syntax. For example {{1, 8}, {3, 9}, {5, 10}, {6, 30}, {10, 70}}[[3;;4]] – Mike Colacino Jul 6 '18 at 20:38
• Incorrect syntax. Please reference what Table does. Also, see Part. – Edmund Jul 6 '18 at 20:39
• @mdc18550 Yes you are right and this answer is correct. My table is very large and the table mentioned above just was an example to ask my question. Thank you very much. – Mehrab Jul 6 '18 at 21:01

Use the Part function to select the 3rd and 4th parts.

Part[{{1,8},{3,9},{5,10},{6,30},{10,70}}, {3,4}]


or using the "[[" shorthand,

{{1,8},{3,9},{5,10},{6,30},{10,70}}[[{3, 4}]]


Both of these return

{{5, 10}, {6, 30}}

• Or Part with Span: table[[3 ;; 4]] – Bob Hanlon Jul 6 '18 at 20:42
• Please add the comment of mdc18550 mentioned above as answer of this question. – Mehrab Jul 6 '18 at 21:04