input: Write a function to generate a random string of a specified length. Return the generated string. Function should include handling for the case when the specified length is zero by returning an empty string.
  assert generate_string(10)=='UyS7iGsdvu'
  assert generate_string(5)=='qFpJ4'
  assert generate_string(0)==''
  assert generate_string(3)=='e8a'
output: import random
  import string
  
  def generate_string(length):
      if length == 0:
          return ''
      return ''.join(random.choices(string.ascii_letters + string.digits, k=length))