#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 lst = ['hongkong','xiantyk','chinat','guangdong','z'] lst2 = [] lst3 = [] lst4 = [] def get_num(): for i in range(len(lst)): for j in range(i+1,len(lst)): lst2 = list(lst[i]) lst3 = list(lst[j]) if len(set(lst2+lst3)) == len(lst2+lst3): num = len(lst2)*len(lst3) lst4.append(num) if len(lst4) == 0: return 0 else: return max(lst4) if __name__ == '__main__': print(get_num())