最新回答 / top_zq
# Enter a codes1 = '123's2 = 'ABC's3 = 'xyz'for c in s1:? ? for c2 in s2:? ? ? ? for c3 in s3:? ? ? ? ? ? print(c+c2+c3)
2023-04-13
最贊回答 / 慕少0598786
因為你寫錯了a=0b=0while True:? ? if a > 1000:? ? ? ? break? ? if a % 2 == 0:? ? ? ? b=b+a? ? a=a+1print(b)?這樣才對
2023-03-27
最新回答 / 天堂沒有神
template1 = 'Life is {},'template2 = 'you need {a}'k423 = 'python'print(template1.format('short'),template2.format(a=k423))這樣就可以
2023-03-15
最新回答 / qq_慕工程7590247
result = template.format(w=w , c=c , b=b, i=i )這一行要這樣寫,w=w,第一個w指template = 'Hello {w}, Hello {c}, Hello , Hello {i}.'這里定義的形參,第二個指 w = 'World'這里定義的實參學了函數就知道了這個報錯就是編譯器找不到你定義的實參
2023-03-15
最贊回答 / qq_慕函數1463992
s1 = set([1,10]) 2個值也就是 for a in s1:??循環2次了。一次if a in s2:? ? ? ? print(a)一次else:? ? ? ? print('none')
2023-02-06