Write a Python function to find all factors of a given number
def all_factors(num):
    results = []
    for i in range(1, num + 1):
        if num % i == 0:
            results.append(i)
    return results