list1 = [1,2,3,4,5] list2 = [4,5,6,7,8] uncommon_element = list(set(list1) ^ set(list2)) # Output: [1,2,3,6,7,8]