import threading 
 
def foo(repeats):
    global value
    for i in range(repeats):
        value += 1
 
def bar(repeats):
    global value
    for j in range(repeats):
        value -= 1
 
value = 0
foo_thread = threading.Thread(target=foo, args=(1000000,))
foo_thread.start()
bar_thread = threading.Thread(target=bar, args=(1000000,))
bar_thread.start()
#foo_thread.join()
#bar_thread.join()
print(f'Value: {value}')
