cleanstring = response.text.replace("'","")
My problem was that the response.text is immutable, so I needed to create a new variable and assign the cleaned string to it. Then I used cleanstring in my call where response.text would have gone.