* Python Program
Write and test the following function:
def mirror(s, v, m, m):
"""
-------------------------------------------------------
Determines if s is a mirror of characters in v around the pivot m.
Use: r = mirror(s, v, m)
-------------------------------------------------------
Preconditions:
s - a string (str)
v - a string of valid characters (str)
m - the mirror pivot string (str not in v)
Postconditions:
returns
is_mirror - True if s is a mirror, False otherwise (bool)
-------------------------------------------------------
"""
A mirror has the following pattern: LmR where L is a (possibly empty) string formed from the letters of a string, and R is the reverse of the string L. m is an pivot string whose characters are not in L or R. For example, the following strings have the abc mirror pattern: "m", "abacmcaba", "cmc", "bbaamaabb". The following strings do not have the abc mirror pattern: "abmb", "gmg", "abacmcabb".
Examples:
>>> print(mirror('abcmcba', 'abc', 'm'))
True
>>> print(mirror('cmc', 'c', 'm'))
True
>>> print(mirror('bbaattaabb', 'ab', 'tt'))
True
>>> print(mirror('abmb', 'ab', 'm'))
False
>>> print(mirror('gmg', 'ab', 'm'))
False
>>> print(mirror('atta', 'at', 'tt'))
False