Python: Import built-in array module and display the namespace of the said module
Python Class ( Basic ): Exercise-1 with Solution
Write a Python program to import a built-in array module and display the namespace of the said module.
Sample Solution:
Python Code:
import array
for name in array.__dict__:
print(name)
Sample Output:
__name__ __doc__ __package__ __loader__ __spec__ _array_reconstructor ArrayType array typecodes
Flowchart:
Python Code Editor:
Contribute your code and comments through Disqus.
Previous: Python Class exercises.
Next: Write a Python program to create a class and display the namespace of the said class.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/python-exercises/class-exercises/python-class-basic-1-exercise-1.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics