# def double_integer(i):
#     return i * 2

# print(double_integer(2))


# tidy up parameter names
# if statement to check first argument
# if 1st argument is R, then sort into ascending order
# else, sort and reverse order.

def flip(a, d):




# print(flip('R', [3, 2, 1, 2]))
# print(flip('L', [3, 2, 1, 2]))

# flip('R', [3, 2, 1, 2])     =>  [1, 2, 2, 3]
# flip('L', [1, 4, 5, 3, 5])  =>  [5, 5, 4, 3, 1]