code: def cross_list(*sequences):
    
    result = [[ ]]
    for seq in sequences:
      result = [sublist+[item] for sublist in result for item in seq]
    return result
docs: From: http://book.opensourceproject.org.cn/lamp/python/pythoncook2/opensource/0596007973/pythoncook2-chp-19-sect-9.html