How to redirect a webpage to another webpage after a certain duration?

Solution
@app.route("/")
def loading():
    # return render_template('loading.html')
    return '

hello it is loading page

' time.sleep(3) return redirect('http://127.0.0.1:5000/home')
return '

hello it is loading page

'
time.sleep(3)
return redirect('http://127.0.0.1:5000/home')

@app.route("/")
def loading():
    return render_template('loading.html')

@app.route('/home')
def home():
    return '

hello it is home page

'

3000 = 3 secs