给python代码快速添加注释的方法

不懂给python代码快速添加注释的方法?其实想解决这个问题也不难,下面让小编带着大家一起学习怎么去解决,希望大家阅读完这篇文章后大所收获。

成都创新互联公司于2013年成立,是专业互联网技术服务公司,拥有项目做网站、成都做网站网站策划,项目实施与项目整合能力。我们以让每一个梦想脱颖而出为使命,1280元依兰做网站,已为上家服务,为依兰各地企业和个人服务,联系电话:13518219792

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代码快速添加注释的方法
分享地址:http://hxwzsj.com/article/pegije.html

其他资讯

Copyright © 2025 青羊区翔捷宏鑫字牌设计制作工作室(个体工商户) All Rights Reserved 蜀ICP备2025123194号-14
友情链接: 成都h5网站建设 成都企业网站制作 移动网站建设 外贸营销网站建设 成都做网站建设公司 定制网站设计 营销型网站建设 成都网站制作 宜宾网站设计 达州网站设计 响应式网站建设 企业网站设计 成都网站设计 成都企业网站建设 网站制作 成都网站建设 网站制作报价 成都网站建设 网站建设方案 成都网站建设 四川成都网站设计 企业网站设计