while True:
while (s = input()):
...
do_smthing1
...
...
do_smthing2
...
from threading import Thread
def worker():
while True:
do_smthing2()
Thread(target=worker).start()
while True:
s = input()
do_smthing1()