def find_common(self, l):
        """
        Find common parts in thelist items ex: 'ab' for ['abcd','abce','abf']
        requires an ordered list
        """
        if len(l) == 1:
            return l[0]

        init = l[0]
        for item in l[1:]:
            for i, (x, y) in enumerate(zip(init, item)):
                if x != y:
                    init = "".join(init[:i])
                    break

            if not init:
                return None
        return init
def find_common ( self , l ) : if len ( l ) == 1 : return l [ 0 ] init = l [ 0 ] for item in l [ 1 : ] : for i , ( x , y ) in enumerate ( zip ( init , item ) ) : if x != y : init = "" . join ( init [ : i ] ) break if not init : return None return init
Find common parts in thelist items ex: 'ab' for ['abcd','abce','abf']
        requires an ordered list