Skip to content

mullaghori/Comma_Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

From the book: Automate the Boring Stuff With Python. Writer: AL Sweigart

Comma_Code

It is a practice project for python beginners.

Say you have a list value like this:

spam = ['apples', 'bananas', 'tofu', 'cats'] 

👉 No.1 Write a function that takes a list value is an argument and returns a string with all the items separated by a comma and a space with and inserted before the last item.

FOR EXAMPLE: Passing the previous spam list to the function would return;

'apples, bananas, tofu, and cats'

But your function should be able to work with any list value passed to it.

About

It is a practice project for python beginners.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages