python打印变量:
1.在Eclipse中输入:
print "Hello world!" myString = "Hello world!" print myString
运行结果:
Hello world! Hello world!
2.格式化字符串
print "%s is in the left of railway station %d" % ("huizhi", 2)
运行结果:
huizhi is in the left of railway station 2
时间: 2024-10-06 00:36:24