def f(s):
    return s.count("e")

a = ["hello", "lksh", "artem", "ira"]
#a.sort(key=len)
a.sort(key=f, reverse=True)
print(a)