MENU
Question -

How do you make an array in Python?



Answer -

Use a list: [“this”, 1, “is”, “an”, “array”] Lists are equivalent to C or Pascal arrays in their time complexity. The primary difference is that a Python list can contain objects of many different types. The array module also provides methods for creating arrays of fixed types with compact representations, but they are slower to index than lists. Also note that the numeric extensions and others define array-like structures with various characteristics as well.

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×