how to skip any condition with loops in python