Убрать отступы в строке Python

response = requests.get(f'{link}/render/?query=&start=0&count={count}&country=En&language=english&currency=5').json()
print(response)
body = response['results_html']
soap = BeautifulSoup(body, "lxml")
price = soap.find('span', class_='market_listing_price_with_fee')
print(price.text)

В response получаю json с которого достаю html, нахожу нужный мне клас и вытягиваю инфу с него, но в самом html есть куча ненужных отступов и переносов(вот пример класса, с которого я достаю инфу)

<span class="market_listing_price market_listing_price_with_fee">\r\n\t\t\t\t\t\t486,30 pуб.\t\t\t\t\t</span>

И по итогу появляются ненужные отступы.

пример

Как их лучше всего убрать?


Ответы (0 шт):