Is it possible to do block-comments in Google Colab?

You can select the lines of code and press (Ctrl + /) to comment or uncomment your selected lines of code.

You can also use triple single quotes (''') at the start and end of the code block you are interested to comment out.

''' ...Your commented code... '''


In the default Colab keyboard shortcuts, you can block comment text using Ctrl+/.

If this does not work for you, check Tools->Keyboard Shortcuts and search for "Comment Current Line" to see what the shortcut is within your current settings.