input: Write a python function to generate a list of prime numbers from 1 to 10.
  assert generate_primes(1, 10) == [2, 3, 5, 7]
  assert generate_primes(1, 5) == [2, 3, 5]
  assert generate_primes(6, 10) == [7]
output: def generate_primes(start, end):
      def is_prime(num):
          if num < 2:
              return False
          for i in range(2, int(num ** 0.5) + 1):
              if num % i == 0:
                  return False
          return True
  
      return [num for num in range(start, end + 1) if is_prime(num)]