input: Write a python function to generate a coupon code of a specified length using a given set of characters.
  assert len(generate_coupon(8, '0123456789ABCDEF')) == 8
  assert len(generate_coupon(12, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')) == 12
  assert all(c in '0123456789' for c in generate_coupon(10, '0123456789'))
output: import random
  
  def generate_coupon(length, characters):
      return ''.join(random.choice(characters) for _ in range(length))