偶然我打印了类似的内容:
print(var, __)
我不明白正在产生什么。似乎会根据_____多长时间来获取历史记录项。我正在使用Pycharm。
__
是变量名。
[_
和___
是不同的变量名称。
[print(var, __)
打印var
的内容,然后打印__
的内容。
根据上下文,可以预先填写_
/__
/ ___
。在Jupyter笔记本中,这是前3个单元格的结果。
您看到的可能是output caching of IPython:
对于从操作返回的输出,类似于输入缓存已存在,但使用_而不是_i。只有这样的动作产生结果(例如,NOT分配)被缓存。如果你是熟悉Mathematica的IPython的_变量的行为与Mathematica的%变量。
以下变量始终存在:
[_] (a single underscore): stores previous output, like Python’s default interpreter. [__] (two underscores): next previous. [___] (three underscores): next-next previous.