print "abc"
#打印abc并换行
print "abc%s" % "d
" #打印abcd
print "abc%sef%s" % ("d", "g")
#打印abcdefg
msg = ‘‘‘
Infomation of user %s:
----------------------
name : %s
age : %d
job : %s
--------END-----------
‘‘‘ %(user,user,age,job)
print(msg)
方便后续排版。
原文:http://www.cnblogs.com/diyusishen/p/6102727.html