Among other answers, I find the easiest way is to use the IDE comment functions which use the Python comment support of #
.
I am using Anaconda Spyder and it has:
It would comment/uncomment a single/multi line/s of code with #
.
I find it the easiest.
For example, a block comment:
# =============================================================================
# Sample Commented code in spyder
# Hello, World!
# =============================================================================