Global variable is None instead of instance - Python
问题 I'm dealing with global variables in Python. The code should work fine, but there is a problem. I have to use global variable for instance of class Back . When I run the application it says that back is None which should be not true because the second line in setup() function - 'back = Back.Back()' # -*- coding: utf-8 -*- from flask import Flask from flask import request from flask import render_template import Search import Back app = Flask(__name__) global back back = None @app.route('/')