已采納回答 / qq_慕少3205394
template='Life?is?short,you?need?{P}' P='python' result=template.format(P=P) print(result)P相當于占位符,沒有給他賦值
2020-09-08
已采納回答 / 慕先生5347740
我覺得這是imooc的IDE本身的問題,我在命令行和python的編輯器中嘗試了之后,print('hello',?'python') 打印出來的就是hello,python
2020-09-06
最贊回答 / 白小九
num=1的時候,會執(zhí)行continue語句,進入下一次循環(huán),后面的num=num+1是執(zhí)行不到的。然后就會變成num值始終為1,while無限循環(huán)的情況
2020-09-06