In a web scraping I'm stuck in replace() function. I want to replace any spaces with dash in a string but it's not working in this sentence, but works in others. I don't know what's wrong with this sentence:
description = "Cooler Master MasterLiquid Lite 240" # got this from html
#description = "hello world"
replace = description.replace('\s+', '-').replace(' ', '-')
print(replace)
#output: Cooler-Master- MasterLiquid-Lite-240