def reverse(string='abc123'): for pos in xrange(-len(string)+1, 1): string += string[abs(pos)] return string[len(string)/2:]