Question: Dictionaries in Python - Write a Python program that prompts the user to enter a string. Then, print every three letter word that can be
Dictionaries in Python -
Write a Python program that prompts the user to enter a string. Then, print every three letter word that can be made using the letters in the string the user entered. Use the dict.txt file as your dictionary.
Note: the permutations function can take a second parameter. parameters( text, n ) will look at every possible permutation of the items in text taken n at a time.
dict.txt (the file is too big, but here's a few words/lines) -
a aa aah aalii aardvark aardwolf aardwolves ab aba abaca abacist aback abacus abaft abalone abamp abampere abandon abandoned abandonment abase abasement abash abashed abashment abate abated abatement abatis abattoir abaxial abb abba abbacy abbatial abbe abbess abbey abbot abbr abbrev abbreviate abbreviated abbreviation abbreviator abb abcoulomb abdicate abdication abdicator abdomen abdominal abdominous abduce abducent abduct abductee abduction abductor abeam abecedarian abecedarium abecedary abele abelmosk aberrance aberrancy aberrant aberration aberrational abessive abet abetment abetted abetter abetting abettor abeyance abeyant abfarad abhenry abhor abhorred abhorrence abhorrent abhorrer abhorring abidance abide abiding abigail ability abiogeneses abiogenesis abiogenetic abiosis abiotic abirritant abirritate abject abjection abjectness abjuration abjuratory abjure abjurer abl
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
