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 |
Is set nesting implemented in python?
How variables are declared in python?
What is step size in python?
How will you capitalize the first letter of string?
When should you use the “break” in python?
What is the difference between a shallow copy and deep copy?
What is data type in python?
Under what circumstances would von use a while statement rather than for?
How to call a function of a module by using its name (a string)?
Is python easy to learn if you know c++?
Is pypy faster than python?
How do you handle exceptions with try/except/finally in python?