<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Find all the prime numbers within a given range.
2, 20<|im_end|>
<|im_start|>assistant
def get_primes_in_range(a, b):
    primes = []
    for num in range(a, b + 1):
        if all(num % i != 0 for i in range(2, num)):
            primes.append(num)
    return primes<|im_end|>
