Skip to content

Instantly share code, notes, and snippets.

View stiteler's full-sized avatar
🎨

Chris Stiteler stiteler

🎨
  • Medium
  • Greater NYC
View GitHub Profile
@stiteler
stiteler / lcr_test.py
Last active September 13, 2017 21:18
Longest common substring for many strings with @dokipen
from itertools import izip
def longest_common_substring(string_list):
def _iter():
for row in izip(*string_list):
s = set(row)
if len(s) == 1:
yield s.pop()
else:
return