用法是將欲輸入的變數前面加上'$': from string import Template s = Template('Hey, $name!') print(s.substitute(name = 'Jimmy')) ...
確定! 回上一頁