class Solution:
def intersection(self, nums1, nums2):
"""
:type nums1: List[int]
:type nums2: List[int]
:rtype: List[int]
"""
s = []
for i in nums1:
if i not in s and i in nums2 :
s.append(i)
return s
原文地址:https://www.cnblogs.com/theodoric008/p/9456700.html
时间: 2024-11-05 12:17:44