s="VictoryOnTheWay" #'A'的ASCII值为65,"a"的ASCII码值为97
mx=""
pre=0
for i in range(1,len(s)):
if ord(s[i]) < 97:
if mx<s[pre:i]:
mx=s[pre:i]
pre=i
print(mx)( )
微信扫码预览、分享更方便