Python: String: Longest Substring

Write the function longest_substring that take two strings and returns the longest substring match between two input strings.


longest_substring('we all agreed; it was a magnificent evening.', 'He was a magnificent person!') -> ' was a magnificent '

Test 1    

Test 2    

Test 3    

Test 4    

Test 5    

Test 6