已采納回答 / 慕慕7454547
>>> d = {'Alice': [50, 61, 66], 'Bob': [80, 61, 66], 'Candy': [88, 75, 90]}>>> for items in d:...? ? ?value=d[items]... print(items,value)
2020-09-25
已采納回答 / 慕慕7454547
可能符號從左往右計量, 首''''從前面計量了三個是指令開始,多一個就'就當做是要輸出的字符串;尾''''從前面計量了三個,按理來說已經是完整的指令了,最后尾巴多出來的'就不能識別了。(我也是才看了幾節課,錯了勿怪)
2020-09-25
已采納回答 / 真實如煙
names1=['Alice','Bob','Candy','David','Ellena']names2=['Gen','Phoebe','Zero']for item in names2:? ? names1.append(item)print(names1)
2020-09-24
s1 = set([1, 2, 3, 4, 5])
s2 = set([1, 2, 3, 4, 5, 6, 7, 8, 9])
if not s1.isdisjoint(s2):
for i in s1:
if i in s2:
print(i)
s2 = set([1, 2, 3, 4, 5, 6, 7, 8, 9])
if not s1.isdisjoint(s2):
for i in s1:
if i in s2:
print(i)
2020-09-23