为什么我用python写的全不对,求解答
查看原帖
为什么我用python写的全不对,求解答
1170758
Coicce楼主2023/10/29 20:08

下面是我的代码,自己测试着好好的,例子也能过,求解答

list1 = [i for i in input().split()]
a = len(list1)
list2 = [0] * a
for i in range(a):
    list2[i] = len(list1[i])
b = list2.index(max(list2))
c = list2.index(min(list2))
print(list1[b])
print(list1[c])
2023/10/29 20:08
加载中...