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

Python > String-1 > make_out_word
prev  |  next  |  chance

Given an "out" string length 4, such as "<<>>", and a word, return a new string where the word is in the middle of the out string, e.g. "<<word>>".

make_out_word('<<>>', 'Yay') → '<<Yay>>'
make_out_word('<<>>', 'WooHoo') → '<<WooHoo>>'
make_out_word('[[]]', 'word') → '[[word]]'

...Save, Compile, Run

See also Python Example Code. Python help docs: Python Strings | Python Lists | Python If Boolean


prev  |  next  |  chance   |  CodingBat  >  String-1

Forget It! -- delete my code for this problem 112.0

Copyright Nick Parlante 2006-10 - privacy