There are control sequences for 'word back' and 'line back' and the like that move the cursor. So, you could try moving the curser back to the start of the text you want to delete, and overriding it with spaces. But this gets complicated very quickly. Thankfully, Python has the standard curses module for "advanced terminal handling".
The only issue with this is that it isn't cross-platform at the moment - that module has never been ported to Windows. So, if you need to support Windows, take a look at the Console module.