三个箭头(“>>”)符号是什么意思? [英] What do the three arrow (">>>") signs mean?

查看:920
本文介绍了三个箭头(“>>”)符号是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以这可能是一个愚蠢的问题,但是我现在已经搜索了很长时间,即使我经常在源代码中看到它们,我也无法弄清楚它们的作用。

So this is probably a dumb question, but I have now been searching for quite some time, and I haven't been able to figure out what they do even though I see them often in source-codes.

推荐答案

您不会在源代码中看到它,它很可能是文档。它表示一个交互式会话,并且在解释器中键入的内容都带有此标记。输出显示时没有箭头。

You won't see it in source code, it's probably documentation. It indicates an interactive session, and things typed into the 'interpreter' are marked with this. Output is shown without the arrows.

实际上, Python文档通常在示例代码的右上角有一个>>> 按钮,以便隐藏箭头(并输出),以便您可以复制并粘贴代码。

In fact, the python documentation often has a button >>>at the top right of example code to be able to hide the arrows (and output) so that you can copy and paste the code.

显示:


隐藏的


Shown:

Hidden:

这篇关于三个箭头(“>>”)符号是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆