human
Program to print all substrings of a given string | Function to print all sub strings.
Pick starting point in outer loop and lengths of different strings for a given starting point.
Driver program to test above function"
How can the above be solved in Python?
assistant
#Here is code to program to print all substrings of a given string and the other steps required.
 def subString ( s , n ) :
	for i in range ( n ) :
		for len in range ( i + 1 , n + 1 ) :
			print ( s [ i : len ] ) ;
s = " abcd " ;
subString ( s , len ( s ) ) ;