Vowel Heavy by Charlie

import sys\x0d
\x0d
def most_vowels(word):\x0d
    vow = len([letter for letter in word if letter in "aeiou"])\x0d
    return vow > len(word) - vow\x0d
\x0d
def filter_by_number_of_vocals(string):\x0d
    \x0d
    return "\n".join([word for word in string.split("\n") if most_vowels(word)])\x0d
\x0d
if __name__ == "__main__":\x0d
    text = "".join(sys.stdin.readlines())\x0d
    sys.stdout.writelines(filter_by_number_of_vocals(text))\x0d

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page