Python Pymysql Range Redistricting