最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

求大佬解答

template1 = 'Life is {1},'

template2 = 'you need {a}'

k423 = 'python'

print(template1.format('short'),template2.format(a=k423))

這是怎么回事?

http://img1.sycdn.imooc.com//641195510001fba412930634.jpg

正在回答

2 回答

template1 = 'Life is {},'

template2 = 'you need {a}'

k423 = 'python'

print(template1.format('short'),template2.format(a=k423))

這樣就可以


0 回復(fù) 有任何疑惑可以回復(fù)我~

怎么才能使用兩個(gè)模板,還是說不行?

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

楓_箏

template = 'Life is short,{}' A = 'you need Python' result = template.format(A) print(result) template = 'Life is short,{}' result = template.format('you need Python') print(result)
2023-07-26 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
Python3 入門教程
  • 參與學(xué)習(xí)       164079    人
  • 解答問題       1131    個(gè)

python3入門教程,讓你快速入門并能編寫簡(jiǎn)單的Python程序

進(jìn)入課程
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)