Longest Uncommon Subsequence | Python program to find longest uncommon subsequence using naive method ; function to calculate length of longest uncommon subsequence ; Case 1 : If strings are equal ; for case 2 and case 3 ; input strings
import math NEW_LINE def findLUSlength ( a , b ) : NEW_LINE INDENT if ( a == b ) : NEW_LINE INDENT return 0 NEW_LINE DEDENT return max ( len ( a ) , len ( b ) ) NEW_LINE DEDENT a = " abcdabcd " NEW_LINE b = " abcabc " NEW_LINE print ( findLUSlength ( a , b ) ) NEW_LINE