4 Respostas
+ 2
"""
code to comment
(im not sure about this)
"""
not commented code
0
If you're using Sublime or Atom, select the lines, and press Ctrl+/
0
I know the method (""" commented lines... """) and many programmers using it, but I read somewhere that this method isn't recommended... :)
I don't know why...
0
Using triple quotes is not recommended as it is mainly used in the doc strings of classes or methods/functions which can in turn be used to create documentation in your code.
Unfortunately it is best in python to use # on each line.
Fortunately many good editors like @Rishi Anand mention and also Pycharm (and even VIM of you configure it) have a short cut using ctrl+/