“вставить в String Python более одного” Ответ

вставить в String Python более одного

>>> shepherd = "Mary"
>>> age = 32
>>> stuff_in_string = "Shepherd {} is {} years old.".format(shepherd, age)
>>> print(stuff_in_string)
Shepherd Mary is 32 years old.
Cheerful Cormorant

вставить в String Python

>>> line = 'Kong Panda'
>>> index = line.find('Panda')
>>> output_line = line[:index] + 'Fu ' + line[index:]
>>> output_line
'Kong Fu Panda'
Cheerful Cormorant

Ответы похожие на “вставить в String Python более одного”

Вопросы похожие на “вставить в String Python более одного”

Больше похожих ответов на “вставить в String Python более одного” по Python

Смотреть популярные ответы по языку

Смотреть другие языки программирования