print "How old are you?",age = raw_input()print "How tall are you?",height = raw_input()print "How much do you weigh?",weight = raw_input()print "So, you're %r old, %r tall and %r heavy." % (age, height, weight)每行 print 后面加了个逗号 (comma) ,这样的话 print 就不会输出新行符而结束这一行跑到下一行去我试着把raw_input( ),改成input( )
结果发现:
you're '20' old, '170' tall and '55' heavy.
变成了
So, you're 20 old, 170 tall and 55 heavy.
版权声明:本文为skyejy原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。