I have a program with this structure:
variable_to_update = 1000
while True:
# this must be running in an infinite loop
do_something(variable_to_update)
In some specific moments I need to update the variable variable_to_update
with my keyboard:
Ex:
if key_pressed == 'up':
variable_to_update += 10
Is there a way to achieve this???? Maybe with the Threading
module?