From 28e15042a889c8a0ee96492b52385aad42cc5d65 Mon Sep 17 00:00:00 2001 From: Sambo Chea Date: Fri, 26 Mar 2021 09:28:47 +0700 Subject: [PATCH] Add separator function to convert to words --- README.md | 3 +++ src/main.py | 5 +++++ src/separator.py | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 src/main.py create mode 100644 src/separator.py diff --git a/README.md b/README.md index 06b9d71..3175ea2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # sentences-separator-to-words From sentences to words by separate the word processing and delegate them into array + +- Text processing unit +- Split the words from sentences \ No newline at end of file diff --git a/src/main.py b/src/main.py new file mode 100644 index 0000000..f9a8c72 --- /dev/null +++ b/src/main.py @@ -0,0 +1,5 @@ +from separator import convertToWords + +sentences = ["Welcome to CUBETIQ Solution"] + +print(convertToWords(sentences)) \ No newline at end of file diff --git a/src/separator.py b/src/separator.py new file mode 100644 index 0000000..4e475dd --- /dev/null +++ b/src/separator.py @@ -0,0 +1,2 @@ +def convertToWords(sentences): + return (sentences[0].split()) \ No newline at end of file