Using a generator that yields the integers 0–9, build and return the corresponding
1-D float array [0.0, 1.0, ..., 9.0], consuming the generator lazily rather than
first materializing a list.
Output
[0. 1. 2. 3. 4. 5. 6. 7. 8. 9.]
Premium problem
This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.