human
Can you provide a code to hamming Distance between two strings and the other steps required given the following:
Hamming Distance between two strings | Function to calculate Hamming distance.
Driver code.
function call"
How can the above be solved in Python?
assistant
#Here is code to hamming Distance between two strings and the other steps required.
 def hammingDist ( str1 , str2 ) :
	i = 0
	count = 0
	while ( i < len ( str1 ) ) :
		if ( str1 [ i ] != str2 [ i ] ) :
			count += 1
		i += 1
	return count
str1 = " geekspractice "
str2 = " nerdspractise "
print ( hammingDist ( str1 , str2 ) )