In Python, generate a script to find the length of a given list.
Input List: [1, 3, 5, 7, 9]
def lengthList(arr):
    length = 0
    for i in arr:
        length += 1
    return length
 
print(lengthList([1, 3, 5, 7, 9])) # Outputs: 5