Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in these substrings are grouped consecutively.
These are a few examples on how to use the boost::python library to extend Python with C++ libraries. Some of the are based on the existing tutorial for boost::python from Joel de Guzman. Others are ...