python IDLE 中快速清除变量快捷键

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

 

posted @ 2022-02-02 21:52  小鲨鱼2018  阅读(179)  评论(0编辑  收藏  举报