You can download this code by clicking the button below.
This code is now available for download.
This function takes two lists as input and returns a new list containing elements that are unique to either of the two lists.
Technology Stack : set
Code Type : List operation
Code Difficulty :
def get_unique_elements(list1, list2):
"""
获取两个列表中不重复的元素。
"""
return list(set(list1) ^ set(list2))