📌  相关文章
📜  python代码示例中的最小值和最大值

📅  最后修改于: 2022-03-11 14:47:15.227000             🧑  作者: Mango

代码示例5
listA = [18, 19, 21, 22]
print('The smallest number from listA is:', min(listA))      # 18
print('The largest number from listA is:', max(listA))        # 22

strA = 'AppDividend'
print('The smallest character from strA is:', min(strA))    # A
print('The largest character from strA is:', max(strA))        # v

strA = 'AppDividend'
strB = 'Facebook'
strC = 'Amazon'
print('The smallest string is:', min(strA, strB, strC))        # Amazon
print('The largest string is:', max(strA, strB, strC))        # Facebook