How redirect to URL in Flask?

import os
from flask import Flask, redirect

app = Flask(__name__)

@app.route('/')
def home():
    return redirect("http://www.google.com", code=302)

if __name__=='__main__':
    app.run(debug=True)