Skip to content

Commit

Permalink
feat: add new list operation
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuanhong-Lan committed Dec 21, 2024
1 parent d8ff541 commit 7e15d5c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ordinary/list_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
class ListOperation:
@classmethod
def non_repetition_list_subtract(cls, list1, list2):
return list(set(list1) - set(list2))
return list(set(list1) - set(list2))

@classmethod
def non_repetition_list_intersection(cls, list1, list2):
return list(set(list1) & set(list2))

0 comments on commit 7e15d5c

Please sign in to comment.