Is there a way to run two pieces of code at once in python?
So I want to create an achievement system for something im making, but want it to update as the main.py is running. Is there a way to do this?
Answered by Coder100 (18071) [earned 5 cycles]
threading is what you want!
from threading import Thread def func1(): # your achievement code def func2(): # your normal game code t1 = Thread(target = func1) t2 = Thread(target = func2) t1.start() t2.start()