Python Pymysql Range Redistribution