How can I pass this code to object oriented programming in Python?
n = int(input())a = input().split()b = input().split()a.sort()b.sort()s = 0
for i in a: ans = 0 m = 0 for j in b: for k in range(min(len(i), len(j))): if(i[k]!=j[k]): break else: ans += 1 if(ans>m): m = ans s += mprint(s)
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here