Shortcut key for commenting out lines of Python code in Spyder

前端 未结 6 1642
南旧
南旧 2021-01-30 00:43

I recently changed from the Enthought Canopy Python distribution to Anaconda, which includes the Spyder IDE.

In Canopy\'s code editor, it was possible to comment and unc

6条回答
  •  臣服心动
    2021-01-30 01:16

    Yes, there is a shortcut for commenting out lines in Python 3.6 (Spyder).

    For Single Line Comment, you can use Ctrl+1. It will look like this #This is a sample piece of code

    For multi-line comments, you can use Ctrl+4. It will look like this

    #============= \#your piece of code \#some more code \#=============

    Note : \ represents that the code is carried to another line.

提交回复
热议问题