PTT
Submit
Submit
选择语言
正體中文
简体中文
PTT
Marginalman
格式化能干嘛
楼主:
corydoras09
(一剑箓魂)
2021-05-16 12:34:03
那个
看不懂格式化
是干嘛用的
范例这样写
>>>thing='wereduck'
>>>place='werepond'
>>>f'The {thing} is in the {place}'
'The wereduck is in the werepond'
那干嘛不一开始就打好==
就只是塞字进去吗?
好复杂
还有什么
{thing.capatalize()}
{thing:>20}
f'{thing[-4:]=}
干
怎么这么复杂
作者:
lturtsamuel
(港都都教授)
2020-05-16 12:34:00
那不叫格式化==
楼主:
corydoras09
(一剑箓魂)
2021-05-16 12:35:00
python的书:(后面的题目我一个都看不懂,
https://i.imgur.com/GTAbfhs.jpg
https://i.imgur.com/PbuhTko.jpg
作者:
lturtsamuel
(港都都教授)
2021-05-16 12:38:00
讲简单的 因为你不能在写程式的时候预测程式执行时要印什么东西出来 例如你写了一只载a片的程式 想显示下载的进度 你就不能预先写死25% 50% 需要执行的时候算
楼主:
corydoras09
(一剑箓魂)
2021-05-16 12:39:00
懂了,大师
作者:
Apache
(阿帕契)
2021-05-16 13:34:00
string format没错啊 C就是这样命名了
继续阅读
Re: [V豚] 4说 呆V
emptie
Re: [姆咪] 恋乃夜是不是母猪实锤了
a000000000
Re: [姆咪] 干
kaeun421
Re: [姆咪] 干
Kimaris
麦块的角色
Kimaris
Re: [姆咪] 恋乃夜是不是母猪实锤了
oz5566
[瓦特] 是我太久没碰的关系吗
rainnawind
[姆咪] 电脑
corydoras09
Re: [闲聊] NBA
qscxz
Re: [姆咪] 干
redDest
Links
booklink
Contact Us: admin [ a t ] ucptt.com