def double_my_digits(str): '''given the string 'str' double the numbers inside and return the new string with each digit doubled''' num = "" for c in str: temp = int(c) * 2 num += str(temp) return num