1 # a="i am {a},age {b}" 2 # v=a.format(a="cat",b="18") 3 # print(v) 4 a="i am {0},age {1}" 5 v=a.format("cat","18") 6 print(v)
format函数,str:选中按住ctrl+鼠标左键出现函数,