how to iterate through all substrings in c++ code example Example: iterate through characters in a string python for c in "string": #do something with c