python -m http.server
python2 -m SimpleHTTPServer
I also wrote a detailed post on my blog many months ago with images etc..
On Android you can install (install it by using F-Droid) Termux, a terminal emulator with a built-in repository, launch it and then install python by running:
packages install phython
then run the command above (run ip addr
if you need to know your address)