diff --git a/projects/007-only-the-words/python/main.py b/projects/007-only-the-words/python/main.py index e69de29b..75ee70e9 100644 --- a/projects/007-only-the-words/python/main.py +++ b/projects/007-only-the-words/python/main.py @@ -0,0 +1,16 @@ +import string + +def only_words(string_input): + + for punctuation in string.punctuation: + if punctuation != "'": + string_input = string_input.replace(punctuation, '') + + List_string = string_input.split() + return List_string + + +user_input = input('Insert a text: ') + +print(only_words(user_input)) +