freeCodeCamp/curriculum/challenges/chinese/08-data-analysis-with-python/data-analysis-with-python-c.../numpy-arrays.md

578 B

id challengeType videoId
5e9a093a74c4063ca6f7c154 11 VDYVFHBL1AM

--description--

More resources:

- Notebook

--question--

--text--

What will the following code print out?

A = np.array([
    ['a', 'b', 'c'],
    ['d', 'e', 'f'],
    ['g', 'h', 'i']
])

print(A[:, :2])

--answers--

[['a' 'b']]

[['b' 'c']
['e' 'f']
['h' 'i']]

[['a' 'b']
['d' 'e']
['g' 'h']]

--video-solution--

3

--hints--

--solutions--