Write a function x_at_either_end(string) that takes a string string as a parameter, which may be empty, and returns a boolean. It returns True if and only if the string string starts or ends with the lower-case character x.
We recommend using the startswith and endswith methods of str.
def x_at_either_end(string):
'''Returns true if string parameter starts and ends with
lowercase letter'''
if (string.startswith(string, x )):
return True
if (string.endswith(string, x )):
return True
return False
print(x_at_either_end('Ping pong'))
print(x_at_either_end('pax'))
print(x_at_either_end('xposure'))