[Solved] The function should return the string multiplied by the integer [closed]


To set a default value in a function you should do like in the code bellow and you don’t have to use str to convert x to a string, just send the string.

def multiply(x,mult_int=10):
    return x*mult_int

print(multiply("I hope that's not your homework.\n", 2))
print(multiply("Bye."))

1

solved The function should return the string multiplied by the integer [closed]