input: Write a function to find the longest common substring between two input strings. The function should compare the two strings and return the longest substring that is common to both. If no common substring is found, the function should 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")=="wel"
  assert longest_common_substring("abcdef", "xyz")==""
  assert longest_common_substring("hello", "world")=="o"
  assert longest_common_substring("programming", "problem")=="rogr"
  assert longest_common_substring("abacad", "cacada")=="acad"
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