标签:for intersect class self list and def append inter
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
leetcode349 python3 112ms 求两个数组的交集
标签:for intersect class self list and def append inter
原文地址:https://www.cnblogs.com/theodoric008/p/9456700.html