1、测试 ctrl + F6(快捷键)
>>> list1 = ["aaa", "bbb", "ccc", "ddd"] >>> list1 ['aaa', 'bbb', 'ccc', 'ddd'] >>> type(list1) <class 'list'> >>> ## 此处执行ctrl + F6, 重启shell,相当于重置变量 ================================ RESTART: Shell ================================ >>> list1 Traceback (most recent call last): File "<pyshell#78>", line 1, in <module> list1 NameError: name 'list1' is not defined