id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

dsawyer@methacton.org > toTheFront
prev  |  next  |  chance

Complete the function so that it returns a list that is identical to the parameter except that the last number in the list has been moved to the front of the list. The list will have a length greater than one.


toTheFront([4, 5, 6]) → [6, 4, 5]
toTheFront([8, 4, 12, 1, 7]) → [7, 8, 4, 12, 1]
toTheFront([100, 32]) → [32, 100]

...Save, Compile, Run (ctrl-enter)

def toTheFront( nums ):

Editor font size %:
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: 200

Copyright Nick Parlante 2017 - privacy