Discuss / Python / 交作业

交作业

Topic source

毛线qwe

#1 Created at ... [Delete] [Delete and Lock User]
    if not L:
        return (None, None)
    Min = L[0]
    Max = L[0]
    for i in L:
        if i < Min:
            Min = i
        if i > Max:
            Max = i
    return (Min, Max)

Yanisgirl

#2 Created at ... [Delete] [Delete and Lock User]

厉害  判断了输入值是否非空

Max = L[0]得出的是一个字符串,然后if i < Min:  两个字符串之间是怎么比较的? 始终想不明白

  • 1

Reply