Question 7

Last Updated :
Discuss
Comments

What will be the result of this code?

Python
import array
arr = array.array('i', [1, 2, 3])
arr.append(4)
print(arr.tolist())



[1, 2, 3]

[1, 2, 3, 4]

[4, 3, 2, 1]

Error due to type mismatch

Share your thoughts in the comments