Every Other Letter

https://www.codecademy.com/courses/learn-python-3/lessons/python-functions-strings-cc/exercises/every-other-letter

this is the exercise link

why my code is not working correctly?

def every_other_letter(word):
  present =[]
  for letter in word:
    if letter in word:
      present.append(letter)
      return present
    else:
      break

# Uncomment these function calls to test your function:
print(every_other_letter("Codecademy"))
# should print Cdcdm

It only returns “C”

Note that the return statement immediately exits the function when it is executed.

what should i use it instead to show with the given output?

Whilst you still want to return something from your function you need to consider when that action should be performed in order to obtain the output you need.