#!/usr/bin/env python3# -*- coding: utf-8 -*-' a test module '__author__ = 'Zhang Shuai'a = [1,2,3,4]b = [3,4,5,6]'''求交集'''#方法1c = [i for i in a if i in b]#方法2c = list(set(a).intersection(se
人见人爱A-B Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 39142 Accepted Submission(s): 10935 Problem Description 参加过上个月月赛的同学一定还记得其中
参照:http://blog.csdn.net/yinxusen/article/details/7450213 集合A = {a, b, c} 集合B = {d, e, c, b} $ man uniqWith no options, matching lines are merged to the first occurrence.-d, --repeatedonly print d
1)Collections.singletonList(x) // 只有1个值的不可变List,修改将抛出异常 package org.example.testSingletonList;import com.google.common.collect.Lists;import java.util.Collections;import java.util.List;public class M