I am writing program for hangman game. this is not matter. when I pass a parameter to the life function, it printing the specific elif block. but also None is print in end of the output.
the program is:
def life(n):
if n==6:
print("|\n|\n|\n|\n|\n")
elif n==5:
print("________\n| |\n|\n|\n|\n|\n|")
elif n==4:
print("________\n| |\n| O\n|\n|\n|\n|")
elif n==3:
print("________\n| |\n| O\n| |\n| |\n| \n|")
elif n==2:
print("________\n| |\n| O\n| /|\ \n| |\n| \n|")
elif n==1:
print("________\n| |\n| O\n| /|\ \n| |\n| __/_\__\n| |||||||")
elif n==0:
print("________\n| |\n| O\n| /|\ \n| |\n| / \ \n|")
print(life(5))
I attached my output. why the None is printing? please anyone explain me detail. output: Output
I want to know only the reason of the output.