註解

# 註解

Python 的註解是1個 # ,後面空一個空白,接下來文字描述。
用於一行註解。
選取程式碼,使用cmd + / 可以多個程式一起註解。

1
2
3
4
# 註解
print("hello world") # 註解
# print("hello world")
# print("hello world")

字串註解

用三個雙引號或三個單引號可用於多行註解。

1
2
3
"""
註解
"""
1
2
3
'''
註解
'''

results matching ""

    No results matching ""