Count Binary Substrings Hackerrank Solution Python