Skip to content

Instantly share code, notes, and snippets.

Created May 3, 2013 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5509051 to your computer and use it in GitHub Desktop.
Save anonymous/5509051 to your computer and use it in GitHub Desktop.
def prestring(string=None):
'''
@summary: function to remove leading & trailing white spaces
'''
if string:
return string.lstrip().rstrip()
else:
return u''
c.faxno = u'+%s %s %s' % (prestring(faxnumbers.telecomcountrycode).replace(u' ', ''),
prestring(faxnumbers.areacitycode).replace(u' ', ''),
prestring(faxnumbers.subscribernumber).replace(u' ', ''))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment