[Solved] tokenizing and parsing with python
To retrieve the data from the file.txt: data = {} with open(‘file.txt’, ‘r’) as f: # opens the file for line in f: # reads line by line key, value = line.split(‘ : ‘) # retrieves the key and the value data[key.lower()] = value.rstrip() # key to lower case and removes end-of-line ‘\n’ Then, data[‘name’] … Read more