strp string from start end code example
Example 1: strip()
txt = ",,,,,rrttgg.....banana....rrr"
x = txt.strip(",.grt")
#outputs banana
print(x)
Example 2: remove a part of a string python
import re
url = 'abcdc.com'
url = re.sub('\.com$', '', url)