Skip to content

Commit 8a1f008

Browse files
committed
分了两个板块,学习python注释的使用
1 parent 55cefb5 commit 8a1f008

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

chapter_1/note.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#------------------------------------------------------------------------------------------------单行注释 start
2+
# Python中单行注释以 # 开头
3+
# 这是一个注释
4+
print("Hello, watermelon!")
5+
#------------------------------------------------------------------------------------------------单行注释 end
6+
7+
#------------------------------------------------------------------------------------------------多行注释 start
8+
# ---------------------------------------------------------------三个单引号
9+
10+
'''
11+
这是多行注释,用三个单引号
12+
这是多行注释,用三个单引号
13+
这是多行注释,用三个单引号
14+
'''
15+
print("Hello, watermelon!")
16+
17+
# ---------------------------------------------------------------三个双引号
18+
19+
"""
20+
这是多行注释,用三个双引号
21+
这是多行注释,用三个双引号
22+
这是多行注释,用三个双引号
23+
"""
24+
print("Hello, watermelon!")
25+
#------------------------------------------------------------------------------------------------多行注释 end

0 commit comments

Comments
 (0)