>>> def capitalize(line):
... return ' '.join([s.capitalize() for s in line.split()])
...
>>> text = 'Твой текст'
>>> print(capitalize(text))
Объяснение:
>>> def capitalize(line):
... return ' '.join([s.capitalize() for s in line.split()])
...
>>> text = 'Твой текст'
>>> print(capitalize(text))
Объяснение: