LOGFILE = "" def printlog(content): print(content) with open(LOGFILE, 'a+', encoding='utf-8') as f: f.write(content + '\n') pass