How to Reverse a String in Python (includes a quick way)

preview_player
Показать описание
How to reverse a string in Python

this shows two methods one using a while loop and the other using a extended slice.
Рекомендации по теме
Комментарии
Автор

Yo man if you don't mind can you tell me how can I write that code but only reverse words that have letters more than 5 only and the rest stays as it is

islamsayed
Автор

Thank you for explaining the [index - 1] part!

leegivhan
Автор

Can someone send me the link for the description of the faster way to reverse strings?

nishchalmistry
Автор

Instead of this you could simply return string[::-1]

BGasperov
Автор

You didnt explain the last part which is what i needed :(

owen
visit shbcf.ru