Простой пример функции Python Strip
string = "softhunt.net"
print(string)
print(string.strip())
print(string.strip('softhunt'))
Outrageous Ostrich
string = "softhunt.net"
print(string)
print(string.strip())
print(string.strip('softhunt'))