Python Insert Variable Into Sql Query Generator