Create a function in Python for computing the average of elements in a given list.
[15, 16, 5, 20, 6, 8]
def calculate_average(nums):
    total = 0
    for i in range(len(nums)):
        total += nums[i]
    return total / len(nums)