Show output of a python sciript as website [duplicate]

I am very new to Python. I just need to see the output of

import os
for k,v in os.environ.items():

as a website, means <server_ip_address>:port. It will be so kind of you if you can help me by doing this. I dont know very much about flask and django etc.

I have tried this also, but not working -

import os
from flask import Flask
app = Flask(__name__)

def hello_geek():
    return print(os.environ)

if __name__ == "__main__":
Back to Top