这是为什么?为何min()函数出错了?正在学 求解惑。
N=int(input())
s=input()
lst=s.split()
print(min(lst))
‘’‘
结果:
D:\00000\Python\venv\Scripts\python.exe D:\00000\Python\practise\l1-79.py
10
86 75 233 888 666 75 886 888 75 666
233
进程已结束,退出代码0
’‘’
这是为什么?为何min()函数出错了?正在学 求解惑。
N=int(input())
s=input()
lst=s.split()
print(min(lst))
‘’‘
结果:
D:\00000\Python\venv\Scripts\python.exe D:\00000\Python\practise\l1-79.py
10
86 75 233 888 666 75 886 888 75 666
233
进程已结束,退出代码0
’‘’
N=int(input())
s=input()
lst=list(map(int, s.split()))
print(lst)
print(min(lst))
正确应该是上面的
你那出来的字符串的比较