W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
demo_python_ref_globals_1.py:
x = globals() print(x)
C:\Users\My Name>python demo_python_ref_globals_1.py
{'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <_frozen_importlib_external.SourceFileLoader object at 0x02A8C2D0>, '__spec__': None, '__annotations__': {}, '__builtins__': <module 'builtins' (built-in)>, '__file__': 'demo_python_ref_globals_1.py', '__cached__': None, 'x'_ {...}}