Python学习笔记(笨方法学Python3)-习题2:注释和#号

注释和#号

# A comment, this is so you can read your program later.
# Anything after the # is ignored by python.

print("I could have code like this,") # and the comment after is ignored

# You can also use a comment to "disable" or comment out code:
# print("This won't run.")

print("This will run.")

文件保存为ex2.py

常见问题:
#的名字(octothorpe)
print(“Hi # there.”) 这里是普通字符
多行注释:每行放一个# (有没有其他办法?)

猜你喜欢

转载自blog.csdn.net/qq_34595352/article/details/89022787