def split_into_words ( s ) : s = re . sub ( r"\W+" , " " , s ) s = re . sub ( r"[_0-9]+" , " " , s ) return s . split ( )
splitting word in to letter in python
Split a sentence into list of words .
def split_into_words(s):
  """Split a sentence into list of words."""
  s = re.sub(r"\W+", " ", s)
  s = re.sub(r"[_0-9]+", " ", s)
  return s.split()