human
Write me a code to divide a string in N equal parts and the other steps required given the following:
Divide a string in N equal parts | Function to print n equal parts of string.
Check if string can be divided in n equal parts.
Calculate the size of parts to find the division points.
Driver program to test the above function Length of string is 28.
.
Print 4 equal parts of the string"
How can the above be solved in Python?
assistant
#Here is code to divide a string in N equal parts and the other steps required.
 def divideString ( string , n ) :
	str_size = len ( string )
	if str_size % n != 0 :
		print " Invalid ▁ Input : ▁ String ▁ size ▁ is ▁ not ▁ divisible ▁ by ▁ n "
		return
	part_size = str_size / n
	k = 0
	for i in string :
		if k % part_size == 0 :
			print   "
" ,
	print i ,
	k += 1
string = " a _ simple _ divide _ string _ quest "
/ * length od string is 28 * /
divideString ( string , 4 )