I need a function that gives an output:
1111
2222
3333
This is what I got as a function:
def repeatNumber(someNumber):
for i in range(0,someNumber):
tabString = "\t"*i
repeatingString = str(i+1)*4+"\n"
finalString = tabString + repeatingString
return finalString
But the output gives my only
1111
when I try to
print(repeatNumber(3))
at the end.
I know I have to add to a string, but I'm not quite sure what string(s) to add together...