function1 generates generates two variables called daydate and numbers. What is to be achieved is that function2 receives this variables, prints and store them in a dataframe. It is very important that the process stays intact.
import random
from multiprocessing import Process
import time
from datetime import datetime
def function1():
while True:
daydate = datetime.now()
numbers = random.randrange(1,215)
print(daydate, numbers)
time.sleep(10)
def function2():
while True:
print("Recevied values from function1: (daydate, numbers)")
time.sleep(10)
if __name__ == "__main__":
a =Process(target=function1, args=())
a.start()
b =Process(target=function2, args=())
b.start()
a.join()
b.join()