input: Write a python function to generate all possible combinations of a given length from a set of characters.
  assert generate_combinations('abc', 3) == ['aaa', 'aab', 'aac', 'aba', 'abb', 'abc', 'aca', 'acb', 'acc', 'baa', 'bab', 'bac', 'bba', 'bbb', 'bbc', 'bca', 'bcb', 'bcc', 'caa', 'cab', 'cac', 'cba', 'cbb', 'cbc', 'cca', 'ccb', 'ccc']
  assert generate_combinations('01', 2) == ['00', '01', '10', '11']
  assert generate_combinations('xyz', 1) == ['x', 'y', 'z']
output: def generate_combinations(characters, length):
      from itertools import product
      return [''.join(comb) for comb in product(characters, repeat=length)]