14. Write a python program to list out all the python modules which have installed in your local computer or laptop.
The output is:
Expected Sample Answer 1:
jupyter-client==5.3.1
jupyter-console==6.0.0
jupyter-core==4.5.0
jupyter==1.0.0
jupyterlab-server==1.0.0
jupyterlab==1.0.2
Sample Answer:
import pkg_resources installed_python = pkg_resources.working_set installed_python_list = sorted(["%s==%s" % (i.key, i.version) for i in installed_python]) for j in installed_python_list: print(j)
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)