about | help | code help+videos | done | prefs |
Write a function that takes a string as a parameter and returns the first, middle and last characters concatenated. If the string is of even length, return the first, middle two and last characters. The string is guaranteed to have enough characters. first_middle_last('Python') → 'Pthn' first_middle_last('Guido') → 'Gio' first_middle_last('Java') → 'Java' ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 200 Post-solution available
Copyright Nick Parlante 2017 - privacy