Yes, there is.
If you have a list, let's call it
words
, then you can use
print
to print those words separated by spaces:
print(*words)
The
*
operator in this context makes sure that each item in the list gets passed as a different argument to
print
. So, if
words
is
['Caps', 'First', 'Letter']
, then the code expands to:
print('Caps', 'First', 'Letter')
And because
print
with multiple arguments prints out each argument separated by spaces, this does exactly what you wanted.
If you would
not use the
*
operator, then the code would expand to this:
print(['Caps', 'First', 'Letter'])
which prints:
['Caps', 'First', 'Letter']
and that's clearly not what you want.