Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions projects/007-only-the-words/python/main.py
Original file line number Diff line number Diff line change
@@ -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()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial uppercase are only for classes in python.

  • Variables are camelCase
  • Constants are total UPPERCASE
  • Classes are Capitalized

return List_string


user_input = input('Insert a text: ')

print(only_words(user_input))