Answer the question
In order to leave comments, you need to log in
How to remove extra characters and words in Json response in Python?
Hello, I'm Python full 0.
Please help
me as much as possible in json response in its pure form so that I have only this value in the output to the console, 1709967
but this value always changes
Answer:{"status":{"success":1},"result":1709967}
Answer the question
In order to leave comments, you need to log in
import json
response_data = '{"status":{"success":1},"result":1709967}'
response = json.loads(response_data)
result = response.get('result')
If the desired value always lies in result
something like this
import json
json.loads(тут_ваш_ответ).get('result', 0)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question