how to implement an infinite loop in python