IPython使用

2021-07-16 07:07

阅读:642

标签:app   col   ipython   out   pre   run   als   路径   结果   

In [14]: %timeit L = [n ** 2 for n in range(1000)]
362 μs ± 16.1 μs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
In [17]: %run my_app.py
4356
In [26]: print(_)    # 历史的输出结果,第一,第二,第三
-2.185039863261519

In [27]: print(__)
-0.4161468365471424

In [28]: print(___)
0.9092974268256817
In [33]: math.sin(2) + math.cos(3); # 禁止一条命令的输出,行末加个;
# 这个结果被默默计算了,结果既不会显示在屏幕上,也不会存储在Out路径下

In [34]: 33 in Out
Out[34]: False

 

IPython使用

标签:app   col   ipython   out   pre   run   als   路径   结果   

原文地址:https://www.cnblogs.com/songxiaohua/p/9487022.html


评论


亲,登录后才可以留言!