Comma formatted list printer
An alternate approach

The routine is same for all types of inputs, except for when the len(list) == 1. This is why we can use a generator function  to simplify the routine, and then a simple if statement to work with the exception

def comma_code(iterable):
    result = ', '.join(str(value) for value in iterable[:-1])
    return f&quot;{result}, and {iterable[-1]}&quot;

Now, since we have to deal with a special case, an if-statement can work
def comma_code(iterable):
    if not iterable: return None
    if len(iterable) == 1: return f&quot;Just {iterable[0]}&quot;

    result = ', '.join(str(value) for value in iterable[:-1])
    return f&quot;{result}, and {iterable[-1]}&quot;

The question hasn't stated what to do if the size of the container is 0, hence I have just returned None. As stated by @Stef in the comments, you can also return an empty string which is just ''. 
I would prefer None as it becomes easy to trace back if an issue occurred. Moreover, you can also design a simple function that would check if the container is empty. If it is then the function can print a custom warning which can help you in debugging your code
Explanation
result = ', '.join(str(value) for value in iterable[:-1])

This is called a generator function, we're basically appending str(value) + ', ' for every value in iterable. iterable[:-1] so that we only iterate till the second last element. 
to be fully verbose, :-1 says everything in iterable up till the last element