import System.IO main = do handle <- openFile "words.txt" ReadMode contents <- hGetContents handle con <- lines contents putStrLn ( show con) hClose handle
def readFile(): allWords = [] for word in open ("words.txt"): allWords.append(word.strip()) return allWords
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)