My attempt at learning how to use threads in Python