Find the required periodic with period 2
else : NEW_LINE INDENT arr = [ '0' ] * l NEW_LINE for i in range ( 0 , l , 2 ) : NEW_LINE INDENT arr [ i ] = '1' NEW_LINE arr [ i + 1 ] = '0' NEW_LINE DEDENT for i in range ( l ) : NEW_LINE INDENT print ( arr [ i ] , end = " " ) NEW_LINE DEDENT DEDENT