You are given two strings. In a single move, you can choose any of them, and delete the first (i.e. leftmost) character.

For Example:

* By applying a move to the string `"where"`, the result is the string `"here"`.
* By applying a move to the string `"a"`, the result is an empty string `""`.

Implement a function that calculates the minimum number of moves that should be performed to make the given strings equal.

## Notes

* Both strings consist of lowercase latin letters.
* If the string is already empty, you cannot perform any more delete operations.

Difficulty: introductory

Starter code:

def shift_left(a, b):
	

Solutions:
def shift_left(a, b):
    r = len(a) + len(b)
    for i in range(-1, -min(len(a), len(b)) - 1, -1):
        if a[i] != b[i]:
            break
        r -= 2
    return r

def shift_left(a, b):
    r = 0
    while a != b:
        if len(b) > len(a):
            b = b[1::] 
            r += 1
        else:
            a = a[1::]
            r += 1
  
    return r

def shift_left(a, b, n=0):
    if a == b:
        return n
    elif len(a)>len(b):
        return shift_left(a[1:], b, n + 1)
    else:
        return shift_left(a, b[1:], n + 1)
        


def shift_left(a, b):
    return min(i+j for i in range(len(a)+1) for j in range(len(b)+1) if a[i:] == b[j:])

import os

def shift_left(a, b):
    x = os.path.commonprefix([a[::-1], b[::-1]])
    return len(a) + len(b) - len(x) * 2

def shift_left(a, b):
    while True:
        if a and b and  a[-1] == b[-1]:
            a, b=a[:-1], b[:-1]
            continue
        return len(a)+len(b)


def shift_left(a, b):
    n = 0
    while not b.endswith(a):
        n += 1
        a = a[1:]
    return n + (len(b) - len(a))

def shift_left(a, b):
    m, n, i = len(a), len(b), -1
    while m > 0 and n > 0 and a[i] == b[i]: i, m, n = i-1, m-1, n-1
    return m + n


def shift_left(a, b):
    return next((len(a) + len(b) - 2*len(b[i:]) for i in range(len(b)) if a.endswith(b[i:])), len(a) + len(b))

def shift_left(a, b):
    for i in range(len(b)):
        if a.endswith(b[i:]):
            return len(a) + len(b) - 2*len(b[i:])
    return len(a) + len(b)