0 out of 464 challenges solved

Find Shared Elements

Write a Python function `find_shared_elements(list1, list2)` that takes two lists as input and returns a list of elements that are common to both lists. The result should not contain duplicate elements, even if the input lists do.

#### Example Usage
```python [main.nopy]
find_shared_elements([1, 2, 3, 4], [3, 4, 5, 6])
# Output: [3, 4]

find_shared_elements(["apple", "banana", "cherry"], ["banana", "cherry", "date"])
# Output: ["banana", "cherry"]

find_shared_elements([1, 2, 2, 3], [2, 3, 3, 4])
# Output: [2, 3]
```
def find_shared_elements(list1, list2):
    """
    Find the shared elements between two lists.

    Args:
        list1 (list): The first list of elements.
        list2 (list): The second list of elements.

    Returns:
        list: A list of unique elements that are common to both input lists.
    """
    # Your code here
    pass