'How to comment a line in Pycharm? [duplicate]

What is the keyboard shortcut to comment text in Pycharm?

When I use ctrl + /, I get:

pycharm screenshot



Solution 1:[1]

  1. Go to your PyCharm settings (ctrl + alt + s) and locate the Keymap on the left sidebar.

  2. Look up comment using the search bar on the top right, and look at the shortcut for Comment with Line Comment.

  3. Change it to whatever you'd like, and see if it works.

Ref.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1