In Python 3, the http.server module can be used to start a simple HTTP server that serves files from the current directory, similar to the SimpleHTTPServer module in Python 2. The equivalent command to python -m SimpleHTTPServer in Python 3 is:
python3 -m http.serverThis will start a server on port 8000 by default, serving files from the current directory. You can also specify a different port number by specifying the port number as an argument:
python3 -m http.server 8080This will start the server on port 8080 instead of the default port 8000.
Python Mega Course: Learn Python in 60 Days, Build 20 Apps
Learn Python on Udemy completely in 60 days or less by building 20 real-world applications from web development to data science.