How can I block comment code in the IPython notebook?
问题 I have defined a function in an IPython notebook and would like to be able to block comment a section of it. Intuitively, I'd expect to be able to highlight a section of code, right click and have an option to comment out the selection but this has not been implemented. Is there a way to do this? 回答1: Default solution In IPython 2.x and 3.x (cmd|ctrl)-/ works but requires an english (american) keyboard layout, see https://github.com/ipython/ipython/pull/3673. Other keyboard layouts In case