Check if there is any other character other than '0' or '1' . If so then set oneSeen to 0 to search again for new pattern
if ( s [ i ] != '0' and s [ i ] != '1' ) : NEW_LINE INDENT oneSeen = False NEW_LINE DEDENT return count NEW_LINE