python的字符串format函数

2026-04-12 08:49:29

1、参数不设置指定位置,按默认顺序。

python的字符串format函数

python的字符串format函数

2、参数设置指定位置,位置即索引。

python的字符串format函数

python的字符串format函数

3、参数设置指定位置,参数在字符串中可以重复多次引用。

python的字符串format函数

python的字符串format函数

4、也可以设置参数名称引用参数,类似于字典。

python的字符串format函数

python的字符串format函数

相关推荐
  • 阅读量:163
  • 阅读量:74
  • 阅读量:170
  • 阅读量:141
  • 阅读量:161
  • 猜你喜欢