while(s[:1]==' ' or s[-1:]==' '):
if(s[0]==' '):
s=s[1:]
if(s[-1]==' '):
s=s[:-1]
return s
Sign in to make a reply
pipi-hongwy
while(s[:1]==' ' or s[-1:]==' '):
if(s[0]==' '):
s=s[1:]
if(s[-1]==' '):
s=s[:-1]
return s