Skip to content

aclongo/comma-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

comma-code

This is my solution to the Comma Code project assignment from Chapter 4: Lists of "Automate the Boring Stuff with Python."

The program allows a user to enter as many words as they would like. Each word is added to a list.
The user can stop entering words by entering a blank space. This will then call the function.
The function takes the list of words and creates a string with comma separation and the word 'and' before the last word.

Example

Input:
cat
bat
frog
dog

Generated List: ['cat', 'bat', 'frog', 'dog']
Output String: 'Your list: cat, bat, frog and dog.'

Input Validation

Prevents the following situations:

  • an empty list [ ]
  • a one item list ['cat']
  • more than one word with spaces entered at once
  • numbers or symbols being entered instead of a word

About

This is my solution to the Comma Code project assignment from Chapter 4: Lists of Automate the Boring Stuff with Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages