length = len(s)
a = 0
while s[0:1] == ' ':
a = a+1
s = s[1:]
while s[-1:] == ' ':
s = s[:-1]
if length == a:
return ''
else:
return s
Sign in to make a reply
EverBefore25971
length = len(s)
a = 0
while s[0:1] == ' ':
a = a+1
s = s[1:]
while s[-1:] == ' ':
s = s[:-1]
if length == a:
return ''
else:
return s