Write a function in Python that takes two lists as arguments and return all their common elements.
[1, 3, 5, 7], [3, 4, 5, 8]
def common_elements(list1, list2):
    common = []
    for num in list1:
        if num in list2:
            common.append(num)
    return common

print(common_elements([1, 3, 5, 7], [3, 4, 5, 8]))