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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!