def log_update(balance): print (balance, end=\'\\n\', flush=True)
print (x, end=\'\\n\', flush=True) <- the flush isn\'t working, anyone has a