How To Reverse The Order Of Words In A String In Python

Published: 05 October 2026
on channel: Jakubication
145
2

In this video, we learn how to reverse the order of words in a string in Python. I first get each word from the string into a list by using the string split method. I then reverse the words in the list by using the list slicing syntax like "[::-1]". Finally, I joined the words back together into a space separated sentence by using the string join method.

#python #pythontutorial #learntocode


On this page of the site you can watch the video online How To Reverse The Order Of Words In A String In Python with a duration of hours minute second in good quality, which was uploaded by the user Jakubication 05 October 2026, share the link with friends and acquaintances, this video has already been watched 145 times on youtube and it was liked by 2 viewers. Enjoy your viewing!