input: Write a function to create a random string of a specified length. The function should accept an integer parameter representing the desired length of the string and return a string containing that many random characters.
  assert generate_string(10)=='abcdefghij'
  assert generate_string(5)=='klmno'
  assert generate_string(0)==''
  assert generate_string(20)=='pqrstuvwxyzABCDEFGH'
  assert generate_string(3)=='123'
output: import random
  import string
  
  def generate_string(length):
      return ''.join(random.choices(string.ascii_letters + string.digits, k=length))