这个是我的代码,运行时候报错,到底是哪里错了呢
def get_max_multiples_of_3(sentence):
sentence = sentence.split("")
list1=[]
for i in sentence:
if abs(int(i)) % 3 ==0:
list1.append(int(i))
list1 = max(list1)
return list1
def get_max_multiples_of_3(sentence):
sentence = sentence.split(" ")
list1=[]
for i in sentence:
if abs(int(i)) % 3 ==0:
list1.append(int(i))
list1 = max(list1)
return list1
print(get_max_multiples_of_3('1 2 3 4 6 0 99 96 0'))