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 PEP8?

0 Answers  


Name few python shells?

0 Answers  


Which language should I learn first c or python?

0 Answers  


What is none literal in python?

0 Answers  


Tell me what flask is and its benefits?

0 Answers  






What is the process to run sub-process with pipes that connect both input and output?

2 Answers  


Which is faster c++ or python?

0 Answers  


What is the command to debug a python program?

0 Answers  


How type casting is done in python?

0 Answers  


Why do lambda forms not have statements?

0 Answers  


Does anaconda automatically install python?

0 Answers  


What are the python types?

0 Answers  


Categories