It joins the characters to final string in reverse order
p = p + s [ y - 1 ] NEW_LINE y = y - 1 NEW_LINE if ( y > l // 2 ) : NEW_LINE p = p + s [ y - 1 ] NEW_LINE y = y - 1 NEW_LINE print ( p ) NEW_LINE