input: Write a function to find the longest common substring in two given strings. The function should return the longest substring that appears in both strings. If there is no common substring, return an empty string.
  def longest_common_substring(str1, str2):
      match = 0
      substr = ""
      for i in range(len(str1)):
          for j in range(len(str2)):
              l = 0
              while (i + l < len(str1) and j + l < len(str2) and str1[i + l] == str2[j + l]):
                  l += 1
              if l > match:
                  substr = str1[i:i + l]
                  match = l
      return substr
  
  assert longest_common_substring("Helwallomst", "Welcome")=="ell"
  assert longest_common_substring("Hello", "Helo")=="Hel"
  assert longest_common_substring("abcdef", "ghijk")==""
  assert longest_common_substring("same", "name")=="ame"
  assert longest_common_substring("a", "a")=="a"
output: def longest_common_substring(str1, str2):
      match = 0
      substr = ""
      for i in range(len(str1)):
          for j in range(len(str2)):
              l = 0
              while (i + l < len(str1) and j + l < len(str2) and str1[i + l] == str2[j + l]):
                  l += 1
              if l > match:
                  substr = str1[i:i + l]
                  match = l
      return substr