2. Use a for loop to find the common elements between the two lists and store them in a new list.
Right Answer:
list1= [1, 2, 3, 4, 5]
list2 = [4, 5, 6, 7, 8]
common_elem=[]
for elem in list1:
if elem in list2:
common_elem.append(elem)
common_elem = set(common_elem) #keep unique elements
print(f"Common elements: {common_elem}")