How To Stop A Python Program From Looping