Running python code in the browser!

So a while back I started to write a 'Beginning Web Development' post on reddit, Ive copied it here incase its usefull to anyone.