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 |
What is repr() function in python?
Why do you use abstract classes?
What is the module and package in python?
What is the difference between a Set and Dictionary?
Which linux is best for python programming?
How do you write a simple code in python?
How can you access a session in flask?
Which language should I learn first c or python?
What is use of list comprehension ?
Write a program to convert all strings in list to integers?
How to make a chain of function decorators?
What is meant by attribute error in python?