pyassistant

Longest Common Prefix

Given a list of strings, return the longest common prefix among all strings. If there is no common prefix, return an empty string.

Example:

Input:
['flower', 'flow', 'flight']
Output:
'fl'

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.