Leetcode 349. Intersection of Two Arrays

送分题

class Solution(object):
    def intersection(self, nums1, nums2):
        """
        :type nums1: List[int]
        :type nums2: List[int]
        :rtype: List[int]
        """
        ans=list(set(nums1)&set(nums2))
        return ans

 

posted @ 2019-03-11 08:04  周洋  阅读(116)  评论(0编辑  收藏  举报