Premium problem106. Selective CSV Import

Medium Locked

text is CSV data with one header line and one footer summary line you don't want. Parse it (treating text as an in-memory file via io.StringIO), skipping the first and last lines and keeping only columns 0 and 2 (in that order). Return the result.

Input

h1,h2,h3
1,2,3
4,5,6
7,8,9
0,0,0

Output

[[1. 3.]
 [4. 6.]
 [7. 9.]]

Premium problem

This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.

Implement solve(...)