Setup And Loop Functions In Python