报错问题
def boll(word1, word2):list1= list(word1)
a1 = len(word1)
list2 = list(word2),#为什么这里不会报错
a2 = len(word2)
n = 0
if a1 == a2:
for each in list1:
if each in list2:
list2.remove(each)
n += 1
if n== a1:
print("great")
boll("eweew","ewewe")
因为在后面加个逗号会变成元组,这在语法规则中是允许的
>>> 1,
(1,)
>>>
页:
[1]