Python注释
不在字符串文字中的井号(#)开始注释。#以后直到物理行末尾的所有字符都是注释的一部分,Python解释器将忽略它们。
示例
#!/usr/bin/python # First comment print "Hello, Python!" # second comment
输出结果
这产生以下结果-
Hello, Python!
您可以在语句或表达式后的同一行上键入注释-
name = "Madisetti" # This is again comment
您可以注释多行,如下所示:
# This is a comment. # This is a comment, too. # This is a comment, too. # I said that already.
Python解释器也会忽略后面的三引号字符串,并且可以将其用作多行注释-
''' This is a multiline comment. '''
热门推荐
1 训练狗狗工作
4 狗狗定点排便训练
5 狗狗训练吠叫
6 狗狗尿垫训练
7 狗狗训练座
8 狗狗训练攻略
9 狗狗训练记
10 做训练狗狗
11 狗狗训练词
12 狗狗谢谢怎么训练
13 狗狗训练如厕
14 狗狗太凶怎么训练
15 狗狗训练它
16 狗狗克制训练
17 训练基地狗狗
18 怎么样训练狗狗大小硬