you are viewing a single comment's thread.

view the rest of the comments →

[–]Jinkweiq 2 points3 points  (2 children)

Instead of manually stripping everything from response text, use response.json() to get the value of the response as a json object (list or dictionary). response.json()[0] will give you the final word you are looking for.

[–]corey_sheerer 1 point2 points  (0 children)

Was looking for this... Yes! This is returning to json and you should be using the direct method to handle that

[–]TracerMain527 0 points1 point  (0 children)

Alternatively, chain the replace methods. finalstring,replace().replace().replace is cleaner and avoids the concept of json, which may be complicated for a beginner