
input = ["any", "albany", "apple", "baby", ""]

output = [x
              for x in input  # You can use a list instead of a for-loop
              if len(x) != 0
              if x[0] == "a"
              if x[-1] == "y"
         ] 

print(output)

