已采纳回答 / 慕慕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