input: Write a function to create a random string of a specified length. If the given length is 0, return an empty string.
  assert generate_string(10) in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
  assert generate_string(0) == ''
  assert len(generate_string(5)) == 5
  assert generate_string(3) != generate_string(3)
output: import random
  import string
  
  def generate_string(length):
      if length == 0:
          return ''
      return ''.join(random.choices(string.ascii_letters + string.digits, k=length))