def long_substr(data):
 substr = ''
 if ((len(data) > 1) and (len(data[0]) > 0)):
  for i in range(len(data[0])):
   for j in range(((len(data[0]) - i) + 1)):
    if ((j > len(substr)) and all(((data[0][i:(i + j)] in x) for x in data))):
     substr = data[0][i:(i + j)]
 elif (len(data) == 1):
  substr = data[0]
 return substr

def long_substr ( data ) : substr = '' if ( ( len ( data ) > 1 ) and ( len ( data [ 0 ] ) > 0 ) ) : for i in range ( len ( data [ 0 ] ) ) : for j in range ( ( ( len ( data [ 0 ] ) - i ) + 1 ) ) : if ( ( j > len ( substr ) ) and all ( ( ( data [ 0 ] [ i : ( i + j ) ] in x ) for x in data ) ) ) : substr = data [ 0 ] [ i : ( i + j ) ] elif ( len ( data ) == 1 ) : substr = data [ 0 ] return substr
return the longest common substring in a list of strings .