Back
What you can do is import the python module(that is .py file) and then call the dir python built-in function. Do not parse the input file as a text file. Let's suppose you want to list what you have in the os module you can do:
import osdir(os)
import os
dir(os)
Want to be a Python expert? Join this Python Training course by Intellipaat to learn more.
31k questions
32.8k answers
501 comments
693 users