Write a python function to convert a given string into a list of words.


Topic: Write a python function to convert a given string into a list of words.

Solution

import re
def words(s, pattern = '[a-zA-Z-]+'):
  return re.findall(pattern, s)



List all Python Programs