Python comment shortcut keys: 1. Single-line comments are [#], Mac shortcut keys are [command /], Windows shortcut keys are [Ctrl /]; 2. Multi-line comments are three single quotes 【'''Comments'''].
The operating environment of this tutorial: Windows 7 system, python version 3.9, DELL G3 computer.
python comment shortcut key:
1. Single-line comment
Single-line comment is
#Mac The shortcut key for windows is command /
The shortcut key for windows is Ctrl /
2. Multi-line comments
Multi-line comments are three single quotes '''Comments'''
Because of this string There is no name, and the program does not do anything with this string, so it has no impact on the running of the program. It is equivalent to a comment, although not really a comment in the strict sense.
Related free learning recommendations: python video tutorial
The above is the detailed content of What is the shortcut key for python comments?. For more information, please follow other related articles on the PHP Chinese website!