DEV Community

saurabh belote
saurabh belote

Posted on

Write a Python program to convert an array to an ordinary list with the same items

from array import *
array_num = array('i', [1, 3, 5, 3, 7, 1, 9, 3])
print("Original array: "+str(array_num))
num_list = array_num.tolist()
print("Convert the said array to an ordinary list with the same items:")
print(num_list)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)