what you supply to print functions is in fact tuple. So it prints tuple
you must learn string formatting
def sentence(subject="i", predicate="play", object_="football"):
print('{} {} {}'.format(subject, predicate, object_))
sentence()
or you can use join method
def sentence(subject="i", predicate="play", object_="football"):
print(' '.join([subject, predicate, object_])
sentence()
in python 3.6+ you can use the new f-strings
def sentence(subject="i", predicate="play", object_="football"):
print(f'{subject} {predicate} {object_}')
sentence()
finally, note that I replaced
object
with
object_
, because
object
is builtin and you are overshadowing it which will bring problems