I read a Python tutorial and I see the following code:
class Database:
pass
database = None
def initialize_database():
global database
database = Database()
Now, why initialize_databaseis there an ad inside global? We have defined databaseoutside the function, does it make it global already?
Regards,
source
share