Why does this function print arg1 arg2
instead of Hello world
? Shouldn't arg be equal to the arguments arg1 and arg2 and then be used in print()
?
def printer(arg1, arg2):
for i in range(2):
arg = 'arg{} '.format(str(i+1))
print(arg, end="")
printer('Hello', 'world')