PythonSkills.org
Courses
Exercices
Challenges
Quizzes
Open console
0 points
Get started
Loading...
All Challenges
Loading...
Loading...
Reverse string in pairs of two
Write a function that takes a string and reverses it in pairs of two characters, leaving the last character if the length is odd.
Intermediate
Hint
sample input: "abcdef"
sample output: badcfe
Loading...
Run Tests
Clear Tests
Test Output:
Show Solution
Show Code
Not Solved
Next challenge: Reverse vowels only