Write a loop in Python to iterate through a list and print all elements that have an even length.
List: ["apples", "oranges", "bananas", "pineapples"]
list_x = ["apples", "oranges", "bananas", "pineapples"]
for item in list_x:
 if(len(item) % 2 == 0):
  print(item)
#output: apples, oranges, pineapples