Anonymous user
Python Workshops for Beginners/Saturday September 27th homework: Difference between revisions
Python Workshops for Beginners/Saturday September 27th homework (view source)
Revision as of 06:10, 18 October 2014
, 9 years ago→Wordplay Exercises
imported>Ynasser |
imported>Ynasser |
||
Line 83:
'''Exercise 4'''
Search through the scrabble wordlist for all words that are palindromes (i.e. the same forwards and backwards).
As a hint, remember that you can reverse strings and lists using the "slice" syntax:
<pre>
>>> word = "pokemon"
>>> word[::-1]
"nomekop"
</pre>
|