5. Write a python program to obtain the length in bytes of one arrays, array_a as provided in the following output.
The output is:
array_a = array('b', [0, 1, 2, 3, 4, 5])
Expected Answer:
The initial array: array('b', [0, 1, 2, 3, 4, 5])
The length in bytes of one array item: 1
Sample Answer:
from array import * array_a = array('b', [0, 1, 2, 3, 4, 5]) print("The initial array: "+str(array_a)) print("The length in bytes of one array item: "+str(array_a.itemsize))
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)