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 pip command in python?
What is the usage of enumerate () function in python?
Why python is called python?
Is init in python a constructor?
Why are we using self as first argument?
What are the supported data types in python?
What does split () do in python?
Does pandas recognize dates when importing data?
What does the meaning of gil in python language?
What is the use of the // operator?
Since switch-case is not used in python – what are the replacements for switch statement in python?
Which database is used in python?