<human>:  location of substring in string.
<bot>: Here is a Python function for location of substring in string

import re

def find(string, sub):
  """Returns the location of substring in string."""
  return string.find(sub)

# Enter the string
string = "Hello, world!"

# Enter the substring
sub = "world"

# Calling the function
print((find(string, sub)))

#Example Output
# 7

#Remember to inspect code for bugs.