All the vowels

Print words longer than ten characters in unixdict.txt that contain each of the five vowels a, e, i, o, and u exactly once with #Python

#! /usr/bin/env python3
with open('unixdict.txt') as f:
  while (line := f.readline().strip()):
    if (len(line) > 10 and all(
            line.count(c) == 1 for c in 'aeiou')):
        print(line)

Unknown's avatar

About Linuxgal

Need a spiritual home? Consider joining us at Mary Queen of the Universe Latter-day Buddhislamic Free Will Christian UFO Synagogue of Vishnu
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply