如何在Jupyter Ipython笔记本中注释掉多行? [英] How do I comment out multiple lines in Jupyter Ipython notebook?

查看:693
本文介绍了如何在Jupyter Ipython笔记本中注释掉多行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想注释掉Jupyter(Ipython笔记本)中的多行代码块,但无法找到当前版本的代码.
它曾经在下拉菜单之一中,但现在不再存在.
您如何一次注释掉多行代码块?

I want to comment out a block of multiple lines in Jupyter (Ipython Notebook), but can't find out how to do that in this current version.
It used to be in one of the drop down menus but is no longer there.
How do you comment out multi-line blocks of code at once?

这不是重复的,因为以下链接中给出的解决方案似乎不再起作用:
如何在IPython笔记本中阻止注释代码?

This is not a duplicate because the solution given in the following link doesn't seem to work anymore:
How can I block comment code in the IPython notebook?

Ctrl + /不执行任何操作.

Ctrl + / does nothing.

推荐答案

Ctrl + /在MS Windows的Chrome浏览器中适用于我.在Mac上,使用 Cmd + /(感谢Anton K).

Ctrl + / works for me in Chrome browser in MS Windows. On a Mac, use Cmd + / (thanks Anton K).

请注意,如果/不能立即使用,请尝试按数字键盘上的/键.在此问题的注释中注明: @DreamFlasher .

Please note, if / did not work out of the box, try pressing the / key on the Numpad. Credit: @DreamFlasher in comments to this question.

这篇关于如何在Jupyter Ipython笔记本中注释掉多行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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