Change e letters to i in words: Difference between revisions

Content added Content deleted
m (→‎{{header|Python}}: Simplified an expression.)
Line 1,143: Line 1,143:
in unixdict.txt
in unixdict.txt
'''
'''
for pair in (
for pair in ieTwins(
ieTwins(
readFile("unixdict.txt")
readFile("unixdict.txt")
)
):
):
print(pair)
print(pair)
Line 1,155: Line 1,153:
# readFile :: FilePath -> IO String
# readFile :: FilePath -> IO String
def readFile(fp):
def readFile(fp):
'''The contents of any file at the path
'''The contents of any file at the path fp.
derived by expanding any ~ in fp.
'''
'''
with open(fp, 'r', encoding='utf-8') as f:
with open(fp, 'r', encoding='utf-8') as f: