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

 

goLeft


Return an List of Strings with every String "left shifted" by one -- so ['a', 'abc', 'def', '123', 'y'] returns ['a', 'bca', 'efd', '231', 'y']. Wait, that is too easy. If the first character is a vowel, add it to the end twice, so ['a', 'abc', 'def', '123', 'y'] returns ['aa', 'bcaa', 'efd', '231', 'y']. Yea, this problem does not believe that y is a vowel


goLeft(['a', 'abc', 'def', '123', 'y']) → ['aa', 'bcaa', 'efd', '231', 'y']
goLeft(['That', 'is', 'one', 'small', 'step', 'for', 'a', 'man']) → ['hatT', 'sii', 'neoo', 'malls', 'teps', 'orf', 'aa', 'anm']
goLeft(['Ask', 'not', 'what', 'your', 'country', 'can', 'do', 'you']) → ['skAA', 'otn', 'hatw', 'oury', 'ountryc', 'anc', 'od', 'ouy']

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

def goLeft(words):

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: 105 Post-solution available

Copyright Nick Parlante 2017 - privacy