def nomes(x):
nome = []
for i in x:
if len(i) == 4:
nome.append(i)
return nome
print(nomes(["abc", "jose", "ana", "maria", "joao", "abcd"]))
#https://pt.stackoverflow.com/q/314030/101
ZGVmIG5vbWVzKHgpOgogICAgbm9tZSA9IFtdCiAgICBmb3IgaSBpbiB4OgogICAgICAgIGlmIGxlbihpKSA9PSA0OgogICAgICAgICAgICBub21lLmFwcGVuZChpKQogICAgcmV0dXJuIG5vbWUKICAgIApwcmludChub21lcyhbImFiYyIsICJqb3NlIiwgImFuYSIsICJtYXJpYSIsICJqb2FvIiwgImFiY2QiXSkpCgojaHR0cHM6Ly9wdC5zdGFja292ZXJmbG93LmNvbS9xLzMxNDAzMC8xMDE=