I want to run
import time
number1 = 1
while True:
number1 = int(number1) + 1
time.sleep(3)
And
import time
number2 = 1
while True:
number2 = int(number2) + 1
time.sleep(20)
At the same time in python, how would I go about doing so? I'm still a beginner, please explain it in simpler terms if you can.
Sub-question: There is little of actual code and more of waiting around, would it be better to use multithreading or multiprocessing?
Sub-question2: Can I run more processes than the number of cores my cpu has in multiprocessing?