Skip to content

Instantly share code, notes, and snippets.

View HarunMbaabu's full-sized avatar
🎯
Focusing

Harun Mbaabu HarunMbaabu

🎯
Focusing
View GitHub Profile
from flask import Flask, render_template, request
from flaskext.mysql import MySQL


app = Flask(__name__)


app.config['MYSQL_HOST'] = 'localhost'

Python Boot Camp : Python Basics & Concepts.

Python is an interpreted, high-level language created by Guido van Rossum and released in 1991. It is dynamically typed and garbage collected.

Python programs have the extension .py and can be run from the command line by typing python file_name.py.

Probably its most noticeable characteristic is its use of significant white space to delimit code blocks, instead of the more popular {} symbols.

End-of-line semicolons (;) are optional and usually not used in Python.

Writing React Directly in HTML

This method of interacting with React is the simplest way and it’s very easy if you have ever worked with HTML, CSS and JavaScript.

  • You’ll need an HTML file where you load three scripts in the head element pointing to their respective CDN – the React, ReactDOM and Babel.

  • Then, you’ll create an empty div element and give it an id of root. This is where your application will live.

  • Lastly, you’ll create a script element where you write your React code.

This is how your index.html file should look like: