创新互联www.cdcxhl.cn八线动态BGP香港云服务器提供商,新人活动买多久送多久,划算不套路!
不懂给python代码快速添加注释的方法?其实想解决这个问题也不难,下面让小编带着大家一起学习怎么去解决,希望大家阅读完这篇文章后大所收获。
python代码快速添加注释的方法
选中要注释的代码,按下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
感谢你能够认真阅读完这篇文章,希望小编分享给python代码快速添加注释的方法内容对大家有帮助,同时也希望大家多多支持创新互联,关注创新互联-成都网站建设公司行业资讯频道,遇到问题就找创新互联,详细的解决方法等着你来学习!
分享名称:给python代码快速添加注释的方法-创新互联
文章URL:https://www.cdcxhl.com/article12/cejidc.html
成都网站建设公司_创新互联,为您提供域名注册、手机网站建设、品牌网站制作、App设计、网站维护、面包屑导航
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联