5

I was wondering, if there is a PRO way of commenting/removing multiline # comments in JupyterNotebooks.

# line1
# line2
# line3

Something like SHIFT + " for adding triple quotes.

TkrA
  • 439
  • 1
  • 5
  • 19

8 Answers8

9

CTRL+/ for comment and uncomment multiple lines you can press 'h' anywhere in command mode, you can find all the shortcuts of jupyter.

Anj
  • 99
  • 5
4

For the big bunch of people that does not use an english keyboard, probably the adequate keys are in other place. In the case of a Spanish Keyboard, I can comment/uncomment lines using "Ctrl + }"

enter image description here

joaquin
  • 82,968
  • 29
  • 138
  • 152
1

On a German keyboard layout I use CMD + ? successfully.

petezurich
  • 9,280
  • 9
  • 43
  • 57
0

For those with a Portuguese keyboard and Windows operating system, CTRL + ~ comments multiple lines.

0

For Portuguese keyboard is ctrl + ;

S.B
  • 13,077
  • 10
  • 22
  • 49
0

for me, German keyboard layout: Ctrl + # works

aVral
  • 65
  • 1
  • 9
0

simply we can use the control + / (back slash) button to we can comment multiple lines at a time.

  • `/` this is a forward slash. Also, please do not copy-paste answers from others, which is clearly plagiarism! – Ro.oT Aug 30 '23 at 19:18
-1

French keyboard

On a french Keyboard use CTRL+/

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343