.format string.format(a,b,c.....),前面字符串里的{}会被forma后面()里的a,b,c置换掉,成为一个新的字符串 print('我叫{},今年{}岁。'.format('小明', 18))