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 |
Mention the use of // operator in Python?
Which oops talks about data hiding?
What are the difference between python and java?
What is python rest api?
What is a sequence in python?
What is @property in python?
How do you calculate the length of a string?
what is python?
How long do goats sleep?
What is the difference between .py and .pyc files?
Explain static class variables in python?
How to implement an 'enum' in python?