Print alternate elements of an array | ''Function to print Alternate elements of the given array ; '' Print elements  at odd positions ; '' Print elements of array ; ''Driver Code
def printAlter ( arr , N ) : NEW_LINE INDENT for currIndex in range ( 0 , N , 2 ) : NEW_LINE INDENT print ( arr [ currIndex ] , end = " ▁ " ) NEW_LINE DEDENT DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT arr = [ 1 , 2 , 3 , 4 , 5 ] NEW_LINE N = len ( arr ) NEW_LINE printAlter ( arr , N ) NEW_LINE DEDENT