projects
/
wordplay-cdsw-solutions
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added new python programs with solutions for the ideas listed on the wordplay page
[wordplay-cdsw-solutions]
/
idea_2.py
diff --git a/idea_2.py
b/idea_2.py
new file mode 100644
(file)
index 0000000..
2bf1d7d
--- /dev/null
+++ b/
idea_2.py
@@ -0,0
+1,10
@@
+# 2. Find and print the words that end in "mt". How about "gry"?
+
+import scrabble
+
+for word in scrabble.wordlist:
+ if word[-2:] == "mt":
+ print(word)
+ elif word[-3:] == "gry":
+ print(word)
+
Benjamin Mako Hill
||
Want to submit a patch?