improve min method in common_prefix

This commit is contained in:
Prodesire 2017-11-26 15:13:45 +08:00
parent 7725d9ed41
commit e10a2dadd3
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ def strips(text, remove):
def common_prefix(l):
commons = []
for i in range(len(min(l, key=len))):
for i in range(min(len(s) for s in l)):
common = l[0][i]
for c in l[1:]:
if c[i] != common: