import threading def test(): f = open("lol.txt", "r", "utf-8") print(f.read()) threading.Thread(target=test).start()