-2

I am new to python, i have a confusion about when we import a module, e.g. import os or any other module, how to know the available methods in each of the module i have imported? Please help.

jonrsharpe
  • 107,083
  • 22
  • 201
  • 376
rk_12
  • 27
  • 8

1 Answers1

2
import(os)
help(os)

That will give you a human-readable help page. Or to get just the function and class names:

dir(os)
John Zwinck
  • 223,042
  • 33
  • 293
  • 407