Python Code To Insert Data From Select