a = " yo! "
b = a.strip() # this will remove the white spaces that are leading and trailing
>>> " xyz ".rstrip()
' xyz'
Use the lstrip() method
>>> name = ' Steve '
>>> name
' Steve '
>>> name = name.lstrip()
>>> name
'Steve '