human
Write a python function to count the number of non-empty substrings of a given string. Here is a solution in Python: ... Give me a the Python program you requested?
assistant
#Here is the Python program you requested.
 def number_of_substrings(str): 
	str_len = len(str); 
	return int(str_len * (str_len + 1) / 2);