PythiloEasy · 12 min · Task 25 of 100 · progress kept in this browser

Common string prefix

Return the longest prefix shared by every string. Return an empty string for no strings.

prefix = 'flower'
while not 'flow'.startswith(prefix):
    prefix = prefix[:-1]
print(prefix)
Your task

Return the longest prefix shared by every string. Return an empty string for no strings.