Print returned words

If words include letter “E” then I need to return these words and another words I need to print out. And I need to reverse returned words.


lib = ["politsei", "mehine","panda","ment","kusi", "treener","leidma", "jooks", "muksid","president"]

def sisend(lib, b):   

  result  =[]

      for i in lib:       
       if b in i:
        result.append(i)
     return result

   print(sisend(lib, 'e'))

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.

markdown_Forums