Write a Python function to replace all occurrences of a given substring with another substring.
Hello World, Hello
def replace_substring(string, old_substring, new_substring):
 return string.replace(old_substring, new_substring)

result = replace_substring("Hello World, Hello", "Hello", "Hi")
print(result)