You can find source code on Github. Under cpython you will be able to find all the modules and python objects (written in C).
You can also find which file (using __file__ attribute) on your system is used for respective module. For example math and random module,
>>> import math
>>> import random
'This module is always available. It provides access to the\nmathematical functions defined by the C standard.'
Now, you can get source code for objects written in python (not C) with inspect get source code. You can also refer Python docs for “inspect” library.
>>> import inspect
(['"""Random variable generators.\n',
' uniform within range\n',
' pick random element\n',
' pick random sample\n',