Is there a builtin command to clear shell while using shell in emacs?
If not, is there an elisp function to achieve the same?
With your point in the *shell* buffer, run:
*shell*
C-c M-o
or
M-x comint-clear-buffer
NOTE: This also works in *Python* shell, but doesn't seem to work in *eshell*.
*Python*
*eshell*