新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)Python教程:如何給python代碼快速添加注釋
python代碼快速添加注釋的方法

成都網(wǎng)絡公司-成都網(wǎng)站建設公司成都創(chuàng)新互聯(lián)公司10多年經(jīng)驗成就非凡,專業(yè)從事成都網(wǎng)站設計、做網(wǎng)站,成都網(wǎng)頁設計,成都網(wǎng)頁制作,軟文發(fā)布平臺,一元廣告等。10多年來已成功提供全面的成都網(wǎng)站建設方案,打造行業(yè)特色的成都網(wǎng)站建設案例,建站熱線:18982081108,我們期待您的來電!
選中要注釋的代碼,按下ctrl+/注釋。
實例
#----->1.用一對"""括起來要注釋的代碼:
"""
number = 23
guess = int(raw_input('Enter an integer : '))
if guess == number:
print 'Congratulations, you guessed it.' # New blockstarts here
print "(but you do not win any prizes!)" # New blockends here
elif guess < number:
"""
#----->2.用一對'''括起來要注釋的代碼塊:
'''
print 'No, it is a little higher than that' #Another block
# You can do whatever you want in a block ...
else:
'''
#----->3.選中要注釋的代碼,按下ctrl+/注釋:
# print 'No, it is a little lower than that'
# # you must have guess > number to reach here
# print 'Done'
# # This last statement is always executed, after the ifstatement is executed 網(wǎng)站欄目:創(chuàng)新互聯(lián)Python教程:如何給python代碼快速添加注釋
網(wǎng)頁鏈接:http://fisionsoft.com.cn/article/djdiisj.html


咨詢
建站咨詢
