try except infinite loop python

polski