forgot password | create account
Or use
about | help | code help+videos | done | prefs
CodingBat code practice


Warmup-1 > front_back
prev  |  next  |  chance

Given a string, return a new string where the first and last chars have been exchanged.

front_back('code') → 'eodc'
front_back('a') → 'a'
front_back('ab') → 'ba'

...Save, Compile, Run

def front_back(str):

Shorter output

Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 133.0

Copyright Nick Parlante 2016 - privacy