Datavant identity resolution workflows may compare normalized identifier strings received in different segment orders. Given two strings, determine whether the second string is a rotation of the first.
A string b is a rotation of string a if b can be produced by moving a prefix of a to its end. The rotation may move zero characters, so every string is a rotation of itself.
Implement is_rotation(a, b).
a and b, containing lowercase English letters and digits.True if b is a rotation of a; otherwise, return False.def is_rotation(a, b):