30日目-Kaprekar Split



--------------------------------------------🤞 My Solution -------------------------------------------
def kaprekar_split(n):
    result = 0
    if n == 1:
        location = 0
    else:
        square = str(n * n)
        location = int(square.__len__() / 2)
        result = int(square[:location]) + int(square[location:])
        if n != result:
            location = -1
    return location