from flask import Flask app=Flask(__name__) @app.route('/') def index(): return '

hello world!

' @app.route('/hello/') def hello(name): return '

hello '+name+'!

' @app.route('/book/') def book(name): return '

I like book 《%s》!

'% name @app.route('//plus/') def plus(num1,num2): return '

%s+%s=%s

'%(num1,num2,num1+num2) @app.route('/height//m') def height(num): cm=num*100 return 'My height is %s cm!' % cm @app.route('/location/') def whereami(location): return 'Your location is %s .' % location