• Courses
  • Tutorials
  • Practice
Switch to Dark Mode

Python Arrays-question-8

Last Updated : Mar 10, 2025
Discuss
Comments

What is the result of the following code?

from array import array
arr1 = array('i', [1, 2, 3])
arr2 = array('i', [4, 5])
arr1 += arr2
print(arr1)


A

array('i', [1, 2, 3, 4, 5])

B

array('i', [4, 5, 1, 2, 3])

C

array('i', [1, 2, 3, 9, 10])

D

Error

Share your thoughts in the comments