本文介绍了如何在 Jupyter Notebook 中阻止评论?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Jupyter Notebook 中注释掉多行的块,但在当前版本中找不到如何做到这一点.
它曾经在其中一个下拉菜单中,但不再存在.
如何一次性注释掉多行代码块?

I want to comment out a block of multiple lines in Jupyter 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 notebook 中屏蔽评论代码?

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?

+ 什么都不做.

推荐答案

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

+ works for me in Chrome browser in MS Windows. On a Mac, use + (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 Notebook 中阻止评论?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 01:55