state transitions 0 takes to q4 , 1 takes to q2
if ( s [ i ] == '0' ) : NEW_LINE INDENT q4 ( s , i + 1 ) ; NEW_LINE DEDENT else : NEW_LINE INDENT q2 ( s , i + 1 ) ; NEW_LINE DEDENT def q4 ( s , i ) : NEW_LINE print ( " q4 - > " , end = " " ) ; NEW_LINE if ( i == len ( s ) ) : NEW_LINE INDENT print ( " YES " ) ; NEW_LINE return ; NEW_LINE DEDENT