I am writing index.py for my web page test on my Ubuntu laptop.
I wrote #!usr/bin/env python3 at the top of the code and used some print() lines below it.
when I open the webpage under my IP address... the page is not printing what I intended and shows the whole code directly.
Could you see what I was wrong with?
Thanks!
Paul
Browsers don't understand python and they shouldn't run any file on your PC, so they will show the file as if it were HTML.
To make a website with python, you can either use a webframework like django  or just write the ouput of your python script into a html/text file.
shebang python line on ubuntu is not working for my webpage