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

Python > String-2 > double_char
prev  |  next  |  chance

Given a string, return a string where for every char in the original, there are two chars.

double_char('The') → 'TThhee'
double_char('AAbb') → 'AAAAbbbb'
double_char('Hi-There') → 'HHii--TThheerree'

...Save, Compile, Run         

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


prev  |  next  |  chance   |  CodingBat  >  String-2

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

Copyright Nick Parlante 2006-10 - privacy