#The dictionary: f = open("glossary.txt", "r") num_lines = sum(1 for line in open("glossary.txt")) def readLines(): global my_glossary global line global words global f f = open("glossary.txt", "r") line = f.readline() words = line.split(",") my_glossary = {} my_glossary[words[0]]=words[1] line = f.readline() words = line.split(",") my_glossary[words[0]]=words[1] while num_lines > 0: readLines() num_lines -=1
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)