I am trying to write even numbers upto a limit into a list in Python using the following code
def odd_count(n):
    arr = list(50)
    for i in range(0,n,2):
        arr[i] = i
    return arr
I am gettting an error sayng TypeError: 'int' object is not iterable. What is wrong in this code? How can I fix it?
 
     
     
     
    