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 Java implementation of Python popularly know?

1 Answers  


What is the best notepad?

0 Answers  


Explain Python's data types.

2 Answers  


What are Python decorators?

2 Answers  


How much do python programmers make?

1 Answers  


How to get a random number in python?

1 Answers  


Which language should I learn first c or python?

1 Answers  


What is asynchronous python?

1 Answers  


How can we make forms in python?

1 Answers  


How to avoid having class data shared among instances in python?

1 Answers  


Does python have private?

1 Answers  


What is encapsulation in python?

1 Answers  


Categories