human
Give me a code to count of sub and the other steps required given the following:
Count of sub | Function to return the count of sub - strings of str that are divisible by k.
Take all sub - strings starting from i.
If current sub - string is divisible by k.
Return the required count.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to count of sub and the other steps required.
 def countSubStr ( str , l , k ) :
	count = 0
	for i in range ( l ) :
		n = 0
		for j in range ( i , l , 1 ) :
			n = n * 10 + ( ord ( str [ j ] ) - ord ( '0' ) )
			if ( n % k == 0 ) :
				count += 1
	return count
if __name__ == ' _ _ main _ _ ' :
	str = "33445"
	l = len ( str )
	k = 11
	print ( countSubStr ( str , l , k ) )