from db import * mode = input('mode: ') words = [] while True: temp = input() if temp == 'exit': break else: words.append(temp) db = read() db[mode] = db[mode] + words write(db) print("--------------") print("ADDED") print("--------------")