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 |
explain the map() function?
What is __ file __ in python?
Which is the invalid variable assignment from the below?
What is the difference between cpython and python?
What is static in python?
How many hours should a person sleep?
Do you know why lambda forms in python does not have statements?
What are the use of sets in python?
How do you reload a python module?
Is there a double type in python?
How to find the index of an item given a list containing it in python?
How to do relative imports in python?