I'm creating a recursive function that creates n lines of asterisk. I do not have problems on writing code, but just am wondering why None
appears in my output.
Here is my code:
def recursive_lines(n):
for n in range(0,n):
print ('*' + ('*'*n)) # Print asterisk
print(recursive_lines(5)) # Enter an integer here
And this is the result:
*
**
***
****
*****
None
I don't think I used any int(print())
kind of statement here.. Then why does this error keep appearing?