...

/

Solution Review: Repetition and Concatenation

Solution Review: Repetition and Concatenation

Review the solution for the "Repetition and Concatenation" exercise.

We'll cover the following...

Solution

Let’s explore the solution to the problem of repetition and concatenation.

Python 3.10.4
def rep_cat(x, y):
return str(x) * x + str(y) * y
print(rep_cat(3, 4))

Explanation

Here’s a line-by-line explanation of the code ...