C-h f python-mode RET will tell you in which file it lives, and you can go to this file by following the link.
You can also use M-x find-function RET python-mode RETto go there directly.
(I feel comfortable having find-functionattached to C-h C-f)
In general, you can use the following:
M-: (find-function major-mode) RET
phils source
share