计算有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))

 

posted @ 2020-06-21 16:32  tf383838  阅读(487)  评论(0编辑  收藏  举报