最新回答 / 一饞小和尚
a = r'''"To be, or not to be":that is the question.Whether it\'s nobler in the mind to suffer.''''
2020-10-22
最贊回答 / 一地幾毛
可以是可以,但是多此一舉啊language = 'Phtyon'result = template.format (language)可以縮寫成一句result = template.format ('Phtyon')你這個是多個變量要套進去才用得著這種形式
2020-10-19
最新回答 / qq_迷失在天堂里云_0
remove函數(shù)只能刪除首個滿足條件的數(shù),不如換種方式
c=[2,5,2,3,3,4,8,'a','b','c','d',1.1] c2=[] for?t?in?c: ????if??isinstance(t,float)?or?isinstance(t,int): ????????c2.append(t) print(c2)
2020-10-18
最新回答 / 四餅同學(xué)
r'''...'''會對'''...'''中的內(nèi)容進行轉(zhuǎn)義單獨的'''...''',就只是一個換行的作用<...圖片...>
2020-10-18
最新回答 / 慕無忌7227368
# Enter a coded = {'Alice': [50, 61, 66], 'Bob': [80, 61, 66], 'Candy': [88, 75, 90]}for key in d.keys():? ? for score in d[key]:? ? ? ? print(key, score)? ??
2020-10-18
已采納回答 / weixin_慕沐9146932
year = '今年 {} 歲'age = 19if age >= 18:? ? print(year.format(age))
2020-10-15
最新回答 / 慕函數(shù)0346336
?# -*- coding: utf-8 -*d = {'Alice': [50, 61, 66], 'Bob': [80, 61, 66], 'Candy': [88, 75, 90]}for key, value in d.items():? ? n=1? ? for score in value:? ? ? ? print('{}的第{}次成績是{}'.format(key, n, score))? ? ? ? n = n+1
Bob的第...
2020-10-13