python中print的几种用法

python中的print有几种常用的用法:

1. print("first example")

2. print("second", "example")

3. print("%s"%("third example"))

4. print("%(forth)s"%{'forth':'forth example'})

5.
fifth = "fifth example"
print("%(fifth)s"%vars())

你可能感兴趣的:(python,format,print,自我心的)