How do you make an array in Python?



How do you make an array in Python?..

Answer / chaitanya

The array module contains methods for creating arrays of fixed types with homogeneous data types. Arrays are slower then list.

Array of characters, integers, floating point numbers can be created using array module.

array(typecode[, intializer])

Returns a new array whose items are constrained by typecode, and initialized from the optional initialized value. Where the typecode can be for instance ‘c’ for character value, ‘d’ for double, ‘f’ for float.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What is flask- wtf? Explain its features.

0 Answers  


How can you identify the data type of any variable in python?

0 Answers  


How do you reload a python module?

0 Answers  


What does the term ‘monkey patching’ refers to in python?

0 Answers  


What is Java implementation of Python popularly know?

0 Answers  


How much bytes do integer and decimal data types hold in python?

0 Answers  


What is orm in python?

0 Answers  


Is python or r more useful?

0 Answers  


Give one example for multiple statements in single statement?

0 Answers  


Which module(s) of python can be used to measure the performance of your application code?

0 Answers  


How do you merge one dictionary with the other?

0 Answers  


Which is fastest implementation of python?

0 Answers  


Categories