I'm in the process of self-teaching Python, and would love to know if there's an equivalent to end="" used with print() for a return function. For instance:
def shape(num,x):
for col in reversed(range(num)):
for row in range(col+1):
print(x,end="")
print()
Gives me the result I want, but how would I use a return function to provide me with the same results?