求指点,无法输出
python吧
全部回复
仅看楼主
level 1
公诗垒pu
楼主
求指点,无法输出
2026年02月06日 15点02分
1
level 12
hitzsf
one = "one"
two = "two"
three = "{0}{1}{0}".format(one,two)
four = "%s %s" % (one, two)
five = f"{one} {two}"
2026年02月06日 16点02分
2
公诗垒pu
没看懂😂
2026年02月06日 16点02分
为啥要做杠精🍼
@公诗垒pu
没看懂就照着敲一遍
2026年02月07日 03点02分
公诗垒pu
照着输了,也有结果了 但是{0}{1}{0},"%s %s" %这两个是什么意思
2026年02月07日 04点02分
公诗垒pu
@为啥要做杠精🍼
好的
2026年02月07日 04点02分
level 10
薄漫y
2026年02月06日 16点02分
3
level 1
XiaoHui406
猜你想找:f-string
2026年02月06日 17点02分
4
level 13
我是真的猪才怪
这个不是有效的语法,你去搜f-string
2026年02月06日 19点02分
5
level 9
山科第一情敌
你确定不是f“{one}{two}”
2026年02月07日 00点02分
6
小紫才不是书呆子~
他应该是想用format方法
2026年02月07日 01点02分
level 4
gituuu
引号吧
2026年02月07日 00点02分
7
level 12
一只水晶兰
字符串有多种格式化方法
如果你不太会建议先学一种
2026年02月07日 09点02分
8
1