shivency

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年6月11日

摘要: 1、输出格式化/多个输出格式化1 x= 42 y= 12.53 4 print 'the rabbit is %d',x5 print 'the rabbit is %d years old',x6 print '%f is average',y7 print '%f * %d' %(y,x)8 print '%f * %d is %f' %(y, x, y*x)4~6行是输出格式化,7~8行为多个输出格式化下面是结果1 the rabbit is %d 42 the rabbit is %d years old 阅读全文
posted @ 2013-06-11 10:56 shivency 阅读(204) 评论(0) 推荐(0) 编辑