human
What is a good Python function to calculate the hamming distance.
assistant
Here is a Python function to calculate the hamming distance

import datetime

def hamming_distance(x, y):
    """Calculate the hamming distance between two strings.

    :param str x:
    :param str y:
    :rtype: int
    :return:
    """
    return len(set(x).symmetric_difference(set(y)))

# Enter the string
x = "hello"
y = "world"

# Calling the function
print((hamming_distance(x, y)))

#Example Output
# 5

#Remember to inspect code for bugs.