Convert array to a python list with same elements using tolist method

suggest change

When you need a Python list object, you can utilize the tolist() method to convert your array to a list.

my_array = array('i', [1,2,3,4,5])
c = my_array.tolist()
# [1, 2, 3, 4, 5]

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents