# Given two lists [1,2,3,4] and [3,4,5,6], create a variable called answer, which is a new list that is the intersection of the two
# Your output should be [3,4] **Hint: Use the "in" operator to test whether an element is in a list
# For example "5 in [1,5,2]" is True. "3 in [1,5,2]" is False

answer = [
    num for num in [1, 2, 3, 4] and [3, 4, 5, 6] if num in [1, 2, 3, 4] and [3, 4, 5, 6]]
print(answer)

# Given a list of words ["Elie", "Tim", "Matt"] create a variable called answer2, which is a new list with each word reversed and in lower case(use a slice to do the reversal)
# Output should be ["eile", "mit", "ttam"]

answer2 = [name.lower()[::-1] for name in ["Elie", "Tim", "Matt"]]
print(answer2)

# Different (maybe better) ways for both
answer = [val for val in [1, 2, 3, 4] if val in [3, 4, 5, 6]]
answer2 = [val[::-1].lower() for val in ["Elie", "Tim", "Matt"]]
