计算有n个字符串中最长的字符串长度

n=int(input())
max = 0
maxstr = ""
for i in range(0, n):
    s =str(input().lstrip())
    if (max < len(s)):
        max = len(s)
        maxstr = s
print("length=%d"%len(maxstr))
原文地址:https://www.cnblogs.com/Deranuid/p/13172883.html