Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

concatenate the squares of numbers in python

def sq(num):
    words = list(str(num)) # split the text
    for word in words:  # for each word in the line:
        print(int(word)**2, end="") # print the word

num = 9119
sq(num)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #concatenate #squares #numbers #python
ADD COMMENT
Topic
Name
4+2 =