代码如下:
#encoding=utf-8
print '中国'
#在python中使用printf
import sys
def printf(format,*args):
sys.stdout.write(format % args)
printf('%d-%f',12,2.3)
打印结果如下:
中国
12-2.300000
代码如下:
#encoding=utf-8
print '中国'
#在python中使用printf
import sys
def printf(format,*args):
sys.stdout.write(format % args)
printf('%d-%f',12,2.3)
中国
12-2.300000