Example:
A = 'abcde'
B = 'cdeab'
can_shift(A, B) == True
A = 'abc'
B = 'acb'
can_shift(A, B) == False
This problem is relatively simple if we work out the underlying algorithm that allows us to easily check for string shifts between the strings A and B. First off, we have to set baseline conditions for string shifting. Strings A and B must both be the same length and consist of the same letters. We can check for the former by setting a condition statement when the length of A and B are equivalent.