The quiz where the difficulty automagically adapts to the player's Python knowledge

This is a question page. You can use this page to bookmark a question. Start a new quiz!

Question #868

```
import numpy as np
my_array = np.array([1, 2, 3])
```

With my_list1 = [my_array] , my_list1 will become [array([1, 2, 3])] , not [1, 2, 3] ! (programiz.com/python-programming/list-comprehension)

Which method will transform the NumPy array below to the the list [1, 2, 3]?

— The Python Quiz (@thepythonquiz) August 9, 2021

import numpy as np

my_array = np.array([1, 2, 3])

my_list1 = [my_array]

my_list1 = my_array.tolist()

π Comment the answer, like and retweet! #python

Question difficulty: π΅π΅π΅π΅π΅