input: Write a python function to generate a random key using the given length and characters.
  assert len(generate_random_key(6, "ACGT")) == 6
  assert all(c in "ACGT" for c in generate_random_key(10, "ACGT"))
  assert len(generate_random_key(8, "0123456789")) == 8
output: import random
  
  def generate_random_key(length, characters):
      return ''.join(random.choice(characters) for _ in range(length))