521. Longest Uncommon Subsequence I

class Solution(object):
def findLUSlength(self, a, b):
"""
:type a: str
:type b: str
:rtype: int
"""
if len(a) == len(b):
if a <> b:
return len(a)
else:
return -1
elif len(a) > len(b):
return len(a)
else:
return len(b)
posted @ 2018-08-01 06:44  ffeng0312  阅读(83)  评论(0)    收藏  举报