KOTA ITO

Generation

generate functionMon, 12 Dec 2022

二つのリストを結合して、ユニークな要素だけを残す。

def union(a, b): a = set(a) b = set(b) c = a.union(b) return list(c) union([1, 2, 3, 4], [3, 4, 5, 6])

Questions about programming?Chat with your personal AI assistant