Welcome. In this kata, you are asked to square every digit of a number.
For example, if we run 9119 through the function, 811181 will come out, because 92 is 81 and 12 is 1.
Note: The function accepts an integer and returns an integer
Solution :
def square_digits(num):
square = ""
strtype_num = str(num)
for number in strtype_num:
square_num = str(int(number) * int(number))
square += square_num
result = int(square)
return result