Solution Exercise 76: Python algorithm to transform a given string by swapping characters
Exercise 76 Write a python algorithm that transform a given string s by swapping the second character (s[1]) with the befor last character. We assume that len(s) is greater or…