run 2 loops simultaneously python
// LOOPING SIMULTANIOUSLY
for (i,j) in zip(range(12,20),range(22,30)):
print(i,j)
run 2 loops simultaneously python
// LOOPING SIMULTANIOUSLY
for (i,j) in zip(range(12,20),range(22,30)):
print(i,j)
python 2 loops at the same time
# You can use threading
import threading # python 3.9.1
def Task_One():
while True:
print('Rawr')
def Task_Two():
while True:
print('de.cxl ig <3')
# Use variable or instantly start thread
threading.Thread(target=Task_One).start() # Task_One()
threading.Thread(target=Task_Two).start() # Task_Two()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us