Reputation: 41
I am trying to find all words from a text file(that I have turned into a list in python)that are made up of letters contained within a randomised string of vowels and consonants
Upvotes: 0
Views: 53
Reputation: 1879
What about:
[w for w in words if set(w) == set(random_str)]
Upvotes: 1