Nilesh Ranpise
Nilesh Ranpise

Reputation: 1

how to check details of user defined function in jupyter notebook?

I am trying to see the details of user defined function in jupyter notebook. I tried with ! Shift + Tab but that did not work. I think it is a command for see details of inbuilt function , How can I check what I need in ...

Upvotes: 0

Views: 371

Answers (1)

Abhinav Dhiman
Abhinav Dhiman

Reputation: 755

You can do this with the built-in inspect library.

def hello_world():
   print("hello_world")

import inspect
source = inspect.getsource(hello_world)
print(source)

Upvotes: 2

Related Questions