|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
为什么我的format不能用关键字参数,位置参数不能超过2个Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
"{a} Love {b}.{c}",format(a="I",b="FishC",c="Com")
TypeError: format() takes no keyword arguments
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
"{0} Love {1}.{2}",format("I","FishC","Com")
TypeError: format() takes at most 2 arguments (3 given)
还有,为什么我穿不了图片。。。
本帖最后由 qiuyouzhi 于 2020-2-29 16:12 编辑
format前不是逗号(,)是点(.)
- "{a} Love {b}.{c}".format(a="I",b="FishC",c="Com")
复制代码
如果有帮助,请设最佳答案~~
|
|