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

 

cse160-staff@cs.washington.edu cse160_23wi_checkin01 > combo_string
prev  |  next  |  chance

Given 2 strings, a and b, return a string of the form short+long+short, with the shorter string on the outside and the longer string on the inside. The strings will not be the same length, but they may be empty (length 0).


combo_string('Hello', 'hi') → 'hiHellohi'
combo_string('hi', 'Hello') → 'hiHellohi'
combo_string('aaa', 'b') → 'baaab'

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

def combo_string(a, b):

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: 127.0

Copyright Nick Parlante 2017 - privacy