Python如何注释代码
很多人都在使用Python软件,不过有不少用户还不知道Python如何注释代码?接下来,小编就为各位带来了Python注释代码的方法,让我们一起来下文中看看吧。
Python如何注释代码?Python注释代码的方法
首先在PyCharm软件中,打开一个Python项目。

在Python项目中,新建并打开一个空白的python文件(比如:test.py)。

在python文件编辑区中,输入一条“print”语句。

在“print”语句的开头,添加“#”字符。

然后点击鼠标右键,在弹出菜单中选择“运行”选项。

在运行结果窗口中,可以看到被注释的“print”语句没有被执行。
