Question: Write a function called double_str that takes a string argument and returns a new string that has all of the same characters as the argument,
Write a function called double_str that takes a string argument and returns a new string that has all of the same characters as the argument, except each one is repeated twice. For example:
double_str('dog') --> 'ddoogg'
looking for python coding below is what I have so far
double_str = 'robert'
double_str 'robert'
for i in range(len(double_str)):
print(double_str[i])
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
