For the Python running console:
NameError: global name '' is not defined
How to solve it?
This operation error, the semantic meaning is: the global name is not defined
例如console台报错:
NameError: global name ‘time’ is not defined
NameError: global name ‘datetime’ is not defined
For such not defined nameerror, just import the package in the ''
import time
from datetime import datetime
This problem is solved