title: Write a program to check the overlapping of one string's suffix with the prefix of another string
body: <pre><code>a = input()
  b = input()
  
  
  
  def longestSubstringFinder(string1, string2):
      answer = &quot;&quot;
      len1, len2 = len(string1), len(string2)
      for i in range(len1):
          match = &quot;&quot;
          for j in range(len2):
              if (i + j &lt; len1 and string1[i + j] == string2[j]):
                  match += string2[j]
              else:
                  if (len(match) &gt; len(answer)): answer = match
                  match = &quot;&quot;
      if answer == '':
          return 'No overlapping'
      else:
          return answer
  
  print(longestSubstringFinder(a, b))
  </code></pre>
  <p>in the above code, not getting the expected outcome for the input
  correct
  wrong</p>
  <p>My output: e
  expected output: No overlapping</p>