Python Wizard

Alrighty then. This one time it was asked whether Java was better than Python for web development?

Answer:

  1. from flask import Flask
  2. app = Flask(__name__)
  3. @app.route(‘/’)
  4. def home():
  5. return “Website content goes here.”
  6. if __name__ == ‘__main__’:
  7. app.run(debug=True)

Run this python script, visit localhost:5000 in your browser and voila your website is deployed. No questions raised đŸ˜‰

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s