## The challenge

Given a string, you have to return a string in which each character (case-sensitive) is repeated once.

 ``````1 2 3 4 5 `````` ``````double_char("String") ==> "SSttrriinngg" double_char("Hello World") ==> "HHeelllloo WWoorrlldd" double_char("1234!_ ") ==> "11223344!!__ " ``````

## The solution in Python code

This can easily be done by looping through each character and appending it to a list, which we then join and return at the end:

 ``````1 2 3 4 5 `````` ``````def double_char(s): out = [] for i in s: out.append(i+""+i) return "".join(out) ``````

However, we could simplify this down to a single list comprehension:

 ``````1 2 `````` ``````def double_char(s): return "".join([i+''+i for i in s]) ``````

Or go one step further:

 ``````1 2 `````` ``````def double_char(s): return ''.join(c * 2 for c in s) ``````

## Test cases to validate our solution

 ``````1 2 3 `````` ``````test.assert_equals(double_char("String"),"SSttrriinngg") test.assert_equals(double_char("Hello World"),"HHeelllloo WWoorrlldd") test.assert_equals(double_char("1234!_ "),"11223344!!__ ") ``````