Find words whose first and last three letters are equal: Difference between revisions

Content deleted Content added
Shuisman (talk | contribs)
Aamrun (talk | contribs)
Added Python implementation
Line 512:
tartar
testes</pre>
 
=={{header|Python}}==
Tested on Python 3+, the file download will work only if the link is still active. It is possible that you may be able to fetch the file in your browser but download via code may still fail. Check whether you are connected to a VPN, it works on open networks
<lang Python>
import urllib.request
urllib.request.urlretrieve("http://wiki.puzzlers.org/pub/wordlists/unixdict.txt", "unixdict.txt")
 
dictionary = open("unixdict.txt","r")
 
wordList = dictionary.read().split('\n')
 
for word in wordList:
if len(word)>5 and word[:3].lower()==word[-3:].lower():
print(word)
</lang>
{{out}}
<pre>
antiperspirant
calendrical
einstein
hotshot
murmur
oshkosh
tartar
testes
</pre>
 
=={{header|Quackery}}==