exercise 8

# 賦值,{}不僅有占位的作用,還有打印{}的作用
formatter = "{} {} {} {}"

# 打印
print(formatter.format(1,2,3,4))
print(formatter.format('one','two','three','four'))
print(formatter.format(True,False,False,True))
print(formatter.format(formatter,formatter,formatter,formatter))
print(formatter.format(
    "Try your",
    "Own text here",
    "Maybe a poen",
    "Or a song about fear"
))

練習(xí)

  1. Do your checks, write down your mistakes, and try not to make the same mistakes on the next exercise.
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 11,131評(píng)論 0 23
  • 當(dāng)我 在床上意識(shí)不清 而你,母親 在遠(yuǎn)方拖著病體打拼 死生模糊之際 我好想你
    君定閱讀 145評(píng)論 0 0
  • 在去學(xué)校的前兩天便獨(dú)身一人去了爬山,自己一人摸摸索索找著路,來(lái)到了山前的入口處,也許是周四上班時(shí)間沒(méi)有什么人,...
    塵瑾閱讀 345評(píng)論 0 0
  • 亞里士多德:重復(fù)的行為造就了我們。因此,卓越不是一個(gè)行為,而是一種習(xí)慣。改變習(xí)慣僅僅是一項(xiàng)技能,只要有正確的指導(dǎo)和...
    lashengcheng閱讀 4,523評(píng)論 1 14

友情鏈接更多精彩內(nèi)容