min(str)
str -- 這是要返回英文最小字母的字串。
#!/usr/bin/python3 str = "www.tw511.com" print ("Min character: " + min(str)) str = "TUTORIALSPOINT" print ("Min character: " + min(str))
Min character: . Min character: A