Contact: aviboots(AT)netvision.net.il
39,959 questions
51,901 answers
573 users
s = ",,,Python,," s = s.strip(',') print(s) ''' run: Python '''
s = ",,,Python,," s = s.lstrip(',').rstrip(',') print(s) ''' run: Python '''
import re s = ",,,Python,," s = re.sub(r'^,+|,+$', '', s) print(s) ''' run: Python '''