input: Write a function to generate a random string of given length. The function takes one parameter, which is the desired length of the string, and returns the random string.
  
  import random
  import string
  
  def random_string(length):
      letters = string.ascii_lowercase
      return ''.join(random.choice(letters) for i in range(length))
  
  assert random_string(6)=="example"
  assert random_string(0)==""
  assert random_string(8)!='aaaaaaa'
output: def random_string(length):
      letters = string.ascii_lowercase
      return ''.join(random.choice(letters) for i in range(length))