def num_ini_spaces(strng):
 ini_spaces = ini_spaces_re.match(strng)
 if ini_spaces:
  return ini_spaces.end()
 else:
  return 0

def num_ini_spaces ( strng ) : ini_spaces = ini_spaces_re . match ( strng ) if ini_spaces : return ini_spaces . end ( ) else : return 0
return the number of initial spaces in a string .