Join us and get access to thousands of tutorials and a community of expert Pythonistas.
This lesson is for members only.Join us and get access to thousands of tutorials and a community of expert Pythonistas.
Reversing Strings in Python (Summary)
Reversing and working with strings inreverse order can be a common task in programming. Python provides a set of tools and techniques that can help you perform string reversal quickly and efficiently. In this video course, you learned about those tools and techniques and how to take advantage of them in your string processing challenges.
In this video course, you learned how to:
- Quickly build reversed strings throughslicing
- Create reversed copies of existing strings using
reversed()and.join() - Useiteration to create reversed strings by hand
Even though this topic might not have many exciting use cases by itself, understanding how to reverse strings can be useful in coding interviews for entry-level positions. You’ll also find that mastering the different ways to reverse a string can help you really conceptualize the immutability of strings in Python, which is a notable feature of the language.
For further investigation, check out:
00:00Congratulations,you’ve made it to the final lesson of the Reversing Strings in Python course.In this course,you learned how to reverse strings using slices and the index operator, reversestrings using thereversed() built-in function, and how to write your very ownstring reversal algorithm.
00:18Here are a few Real Python resources for you to explore.The first is Efficient String Concatenation in Python. In this course,you’ll learn how to efficiently concatenate strings in a few different ways.
00:30The second one is Reverse Python Lists.This course will cover similar topics to the Reversing Strings course,but discusses many of these topics in more depth and gives you more exposure tosequence-type reversal techniques.
00:45Another great course is Python Mutable vs Immutable Types.While mutability was briefly mentioned in the Reversing Strings course,this course goes into a great deal of depth, teaching you all you need to knowabout mutability in Python.
01:01The custom algorithm lesson of the Reversing Strings course leveragedwhileloops.These two following courses will teach you Pythonwhile loops andfor loops.
01:09These will allow you to dive intowhile andfor loops without additionaldistractions. I
01:16hope you join us again for more courses at realpython.com.Have fun reversing all the strings. If you like,you can expand and modify the custom algorithm from the previous lesson andcomment it down below.
Course Contents

